From 8071d6afd1f6849270d1a22fcd21f7ac429c21f9 Mon Sep 17 00:00:00 2001 From: Jon Chery Date: Tue, 28 Jul 2026 17:07:23 +0000 Subject: [PATCH] fix(ci): target only VPC resources in platform-vpc-apply/destroy The platform stack includes Lambda, DynamoDB, Secrets Manager, and KMS resources that have pre-existing state issues (a secret scheduled for deletion blocks creation). The lifecycle pipeline only needs the VPC. Use terraform -target to apply/destroy only the VPC-related resources: aws_vpc.acdl_shared, aws_subnet.acdl_shared, aws_internet_gateway, aws_route_table, aws_route_table_association, aws_security_group.ecs. ---ci--- project: acdl phase: P59 milestone: v1.11 status: execute ---/ci--- --- .gitea/workflows/modules-lifecycle.yml | 16 ++++++++++++++-- .github/workflows/modules-lifecycle.yml | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/modules-lifecycle.yml b/.gitea/workflows/modules-lifecycle.yml index ce797b8..e454464 100644 --- a/.gitea/workflows/modules-lifecycle.yml +++ b/.gitea/workflows/modules-lifecycle.yml @@ -47,7 +47,13 @@ jobs: AWS_DEFAULT_REGION: us-east-1 run: | terraform init -input=false -lock=false - terraform apply -auto-approve -lock=false + terraform apply -auto-approve -lock=false \ + -target=aws_vpc.acdl_shared \ + -target=aws_subnet.acdl_shared \ + -target=aws_internet_gateway.acdl_shared \ + -target=aws_route_table.acdl_shared \ + -target=aws_route_table_association.acdl_shared \ + -target=aws_security_group.ecs # L1 lifecycle matrix: apply simple → apply complex (modify) → destroy lifecycle: @@ -113,4 +119,10 @@ jobs: AWS_DEFAULT_REGION: us-east-1 run: | terraform init -input=false -lock=false - terraform destroy -auto-approve -lock=false \ No newline at end of file + terraform destroy -auto-approve -lock=false \ + -target=aws_vpc.acdl_shared \ + -target=aws_subnet.acdl_shared \ + -target=aws_internet_gateway.acdl_shared \ + -target=aws_route_table.acdl_shared \ + -target=aws_route_table_association.acdl_shared \ + -target=aws_security_group.ecs \ No newline at end of file diff --git a/.github/workflows/modules-lifecycle.yml b/.github/workflows/modules-lifecycle.yml index ce797b8..e454464 100644 --- a/.github/workflows/modules-lifecycle.yml +++ b/.github/workflows/modules-lifecycle.yml @@ -47,7 +47,13 @@ jobs: AWS_DEFAULT_REGION: us-east-1 run: | terraform init -input=false -lock=false - terraform apply -auto-approve -lock=false + terraform apply -auto-approve -lock=false \ + -target=aws_vpc.acdl_shared \ + -target=aws_subnet.acdl_shared \ + -target=aws_internet_gateway.acdl_shared \ + -target=aws_route_table.acdl_shared \ + -target=aws_route_table_association.acdl_shared \ + -target=aws_security_group.ecs # L1 lifecycle matrix: apply simple → apply complex (modify) → destroy lifecycle: @@ -113,4 +119,10 @@ jobs: AWS_DEFAULT_REGION: us-east-1 run: | terraform init -input=false -lock=false - terraform destroy -auto-approve -lock=false \ No newline at end of file + terraform destroy -auto-approve -lock=false \ + -target=aws_vpc.acdl_shared \ + -target=aws_subnet.acdl_shared \ + -target=aws_internet_gateway.acdl_shared \ + -target=aws_route_table.acdl_shared \ + -target=aws_route_table_association.acdl_shared \ + -target=aws_security_group.ecs \ No newline at end of file