DeleteStack swallowed every resource-deletion failure and always reported
DELETE_COMPLETE. Deleting a stack that owned a non-empty AWS::S3::Bucket
therefore "succeeded" while the bucket and its objects were left behind,
which diverges from AWS (S3 refuses to delete a non-empty bucket, so the
stack must end in DELETE_FAILED).
- CloudFormationResourceProvisioner#delete no longer wraps resource deletion
in a catch-all; failures propagate to the stack-level handler. The lenient
*Safe helpers and the intentional KMS key no-op are preserved.
- CloudFormationService#deleteStackResources now records per-resource
failures: the resource is marked DELETE_FAILED with a reason and event,
remaining resources are still attempted, and the stack settles into
DELETE_FAILED (retaining the stack and its exports) instead of being
reported as deleted. Resources left in DELETE_FAILED are re-attempted on a
subsequent delete, matching AWS retry behavior.
This corrects the same silent-success deviation for every managed resource
type, not just S3 buckets.
Adds a Java integration regression test and AWS CLI compatibility tests
covering both the non-empty (DELETE_FAILED) and empty (DELETE_COMPLETE)
bucket cases.
Fixes#1539
AWS::EC2::VPC and AWS::EC2::Subnet (and related networking resources) had no
provisioner case, so they fell through to the stub branch: CloudFormation
reported CREATE_COMPLETE and exported a fake "logicalId-<random>" physical id,
but the subnet was never created in EC2. ec2 describe-subnets did not return it
and elbv2 create-load-balancer failed with "The subnet ID '...' does not exist".
Inject Ec2Service into CloudFormationResourceProvisioner and add cases for VPC,
Subnet, SecurityGroup, InternetGateway, RouteTable, SubnetRouteTableAssociation,
Route, NatGateway and EIP. Each delegates to the existing Ec2Service create
methods and sets the physical id to the real vpc-/subnet-/... id so Ref/exports
resolve to resources EC2 and ELBv2 can use. Topological ordering already
guarantees parents are provisioned before children.
Adds a CloudFormation+EC2+ELBv2 integration test plus AWS CLI and CDK
compatibility coverage.
Closes#1297
The AWS CLI's passes the full changeset ARN
(returned by CreateChangeSet) as the ChangeSetName parameter to subsequent
calls. CloudFormationService was doing a direct map lookup by the raw
parameter value, which always missed because changesets are stored by
short name — causing a 400 ChangeSetNotFoundException and the CLI to
crash with .
Add resolveChangeSetName() to extract the short name from an ARN before
the map lookup, and apply it in describeChangeSet, executeChangeSet, and
deleteChangeSet.
Closes#606
Co-authored-by: Dixit R Jain <dixitrjain@Mac-1319.lan>