#!/usr/bin/env bash # scripts/run_l2_lifecycle_destroy.sh — run a single L2 module lifecycle destroy. # # Usage: run_l2_lifecycle_destroy.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. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT" MODULE="$1" CONTRACT="modules/l2/${MODULE}/examples/complex.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 destroy command bash scripts/run_platform.sh --destroy "$CONTRACT"