#!/usr/bin/env bash # scripts/run_l2_lifecycle_test.sh — run a single L2 module lifecycle apply/modify. # # Usage: run_l2_lifecycle_test.sh [ci-vpc-outputs.json] # # Wraps run_platform.sh for L2 composition modules in the modules-lifecycle # pipeline. Sets ACDL_REMOTE_STATE_KEY to point to the CI VPC state so the # microservice composition's terraform_remote_state data source reads from # the short-lived CI VPC (not the long-lived platform VPC). set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT" MODULE="$1" EXAMPLE="$2" # simple or complex CONTRACT="modules/l2/${MODULE}/examples/${EXAMPLE}.yml" # Point terraform_remote_state to the CI VPC state (not the platform VPC) export ACDL_REMOTE_STATE_KEY="spike/ci-vpc/terraform.tfstate" # Run the platform lifecycle command bash scripts/run_platform.sh --apply "$CONTRACT"