chore(cloudformation-include): remove hardcoded S3 bucket names from integ test templates#37069
Open
aemada-aws wants to merge 1 commit intomainfrom
Open
chore(cloudformation-include): remove hardcoded S3 bucket names from integ test templates#37069aemada-aws wants to merge 1 commit intomainfrom
aemada-aws wants to merge 1 commit intomainfrom
Conversation
…teg test templates Three cloudformation-include integration tests fail with S3 bucket name collision errors (AlreadyExists, HTTP 409) because their CloudFormation template JSON files contain hardcoded S3 bucket names. - tags-with-intrinsics.json: removed BucketName property (test verifies tag intrinsics, not bucket naming) - novalue-boolean.json: removed BucketName property (test verifies AWS::NoValue handling, not bucket naming) - grandchild-import-stack.json: replaced BucketName with Tags using the same Fn::Join + Ref pattern to preserve nested stack parameter passing test intent
Contributor
|
|
||||||||||||||
Contributor
|
|
||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
N/A
Reason for this change
Three
cloudformation-includeintegration tests fail with S3 bucket name collision errors (AlreadyExists, HTTP 409) because their CloudFormation template files contain hardcoded S3 bucket names. Since S3 bucket names are globally unique, these tests cannot deploy reliably.Failing tests:
integ.resource-tags-wtih-intrinsics— hardcodedBucketName: "cdk-integ-cfn-include-bucket2"intags-with-intrinsics.jsoninteg.novalue-nonstring— hardcodedBucketName: "test-novalue-boolean-bucket"innovalue-boolean.jsoninteg.nested-stacks— hardcoded bucket namebucket-name-prefix-some-magic-bucket-nameviaFn::Joiningrandchild-import-stack.jsonOriginal errors:
Description of changes
Removed hardcoded
BucketNameproperties from the CloudFormation template JSON files used by these integration tests, allowing CloudFormation to auto-generate unique bucket names.tags-with-intrinsics.json: RemovedBucketNameproperty. The test's purpose is to verify CfnInclude handles tags with intrinsic functions (Fn::If,Fn::Select,AWS::NoValue) — the bucket name is irrelevant to this.novalue-boolean.json: RemovedBucketNameproperty. The test's purpose is to verify CfnInclude handlesAWS::NoValuein place of a boolean (ObjectLockEnabled) — the bucket name is irrelevant to this.grandchild-import-stack.json: ReplacedBucketName(which usedFn::JoinwithRef: MyBucketParameter) with aTagsproperty using the sameFn::Join+Refpattern. This preserves the test's intent of verifying nested stack parameter passing through CfnInclude while avoiding the name collision.No
.tsinteg test files were modified — only the JSON template files they reference.Destructive changes: All three tests have WILL_REPLACE on their S3 bucket resources. This is expected and intentional — removing hardcoded bucket names requires bucket replacement.
Describe any new or updated permissions being added
N/A
Description of how you validated changes
All three tests deployed successfully:
Results:
No skipped tests. No converted tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license