front-integrations/terraform/build_packages_external.sh
Adam Moussa 7bbdbabe3a
feat(terraform): migrate front-integrations to HCP Terraform (PLAT-72) (#41)
* feat(terraform): migrate front-integrations to HCP Terraform

Freeze SAM CD and add Terraform for seahaven-prod (Lambdas, DynamoDB,
EventBridge, alarms) so HCP becomes the sole deploy path. Include prod
secret ARNs in the tfvars example for workspace wiring.

* fix(terraform): reject symlink sources in Lambda package build
2026-08-05 18:48:16 -04:00

17 lines
495 B
Bash
Executable file

#!/usr/bin/env bash
# Terraform external data source entrypoint. Stdout must be JSON only.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
"${ROOT}/build_packages.sh" >&2
hash="$(
{
# -P: do not follow symlinks; only hash regular files under build/.
find -P "${ROOT}/build/sla_monitor" "${ROOT}/build/user_sync" -type f -print0 2>/dev/null \
| sort -z \
| xargs -0 sha256sum
} | sha256sum | awk '{print $1}'
)"
printf '{"status":"ok","hash":"%s"}\n' "${hash}"