Lab teardown

The stacks use deletionPolicy: Retain. To remove created resources, keep the cluster, runner, roles and state available while Terraform plans the destroy. Verify the ID and AWS account of each target.

Confirm the target first: the direct workflow can apply a destroy plan without pausing.

# One existing lab stack at a time
STACK=direct-apply-security-group
kubectl -n platform-system patch iacstack "$STACK" --type=merge \
  -p '{"spec":{"lifecycle":{"destroy":true}}}'
kubectl -n platform-system get iacstack "$STACK" -w

Open the attempt in Argo and review the planned deletions. Where a gate is present, approve only the expected lab resources. Repeat for manual-approval-security-group, opa-s3-private and opa-vpc if created. The denied opa-s3-public stack never created a bucket. Check each destination again using its tutorial query before removing its IaCStack. Earlier lab rounds included cleanup. End-to-end governed teardown of the parameterized example still needs acceptance.

After verifying AWS and confirming there are no active attempts, remove the lab Pod Identity associations and roles, archive reports and handle versioned bucket objects according to retention. Delete a dedicated exercise cluster with eksctl if you created it. On a shared EKS cluster remove only lab resources.