feat(P2): env-transition detect-and-destroy — REQ-282..287
- core/env_transition.py: detect_prior_env() + record_applied_env() via DynamoDB nova-contracts table (REQ-282,283) - scripts/run_platform.sh Step 0b: detect env change, destroy prior env (deletion_protection=false, terraform init -reconfigure + destroy), emit ENV_DESTROYED evidence event, fail closed on destroy failure (REQ-284) - scripts/run_platform.sh: record applied env after successful apply (REQ-285) - .github/workflows/deploy.yml: pass NOVA_CONSUMER_REPO to run_platform.sh (REQ-286) - adapters/terraform/adapter.py: doc comment on env-scoped state key (REQ-287) No orphan path: if destroy fails, pipeline exits non-zero (no apply runs). ---ci--- project: acdl phase: 2 milestone: v1.24 status: execute requirements: [REQ-282,REQ-283,REQ-284,REQ-285,REQ-286,REQ-287] ---/ci---
This commit is contained in:
@@ -115,6 +115,9 @@ def adapt(stack_instance, out_dir):
|
||||
environment = stack.get("environment", "dev")
|
||||
account_id = env.get_env("AWS_ACCOUNT_ID", "581513795199")
|
||||
state_bucket = f"nova-tfstate-{account_id}-us-east-1"
|
||||
# State key is env-scoped (v1.24 REQ-287): the {environment} segment lets
|
||||
# the env-transition detect-and-destroy step target the PRIOR env's state
|
||||
# without affecting the new env. No orphan path on environment promotion.
|
||||
terraform_tf = (
|
||||
'terraform {\n'
|
||||
' required_version = ">= 1.9, < 1.10"\n'
|
||||
|
||||
Reference in New Issue
Block a user