Skip to content

fix(core): Fn::Transform excluded in resource deep merge#36218

Open
ulrokx wants to merge 2 commits intoaws:mainfrom
ulrokx:rikirk/fn-transform-merge
Open

fix(core): Fn::Transform excluded in resource deep merge#36218
ulrokx wants to merge 2 commits intoaws:mainfrom
ulrokx:rikirk/fn-transform-merge

Conversation

@ulrokx
Copy link
Copy Markdown

@ulrokx ulrokx commented Nov 26, 2025

The intrinsic function Fn::Transform can be used anywhere in a CloudFormation template which makes it special compared to the other intrinsic functions. In order for CfnResources to have Fn::Transform as a property key, this intrinsic needs to be merged like any other property.

Issue # (if applicable)

#36203

Reason for this change

Fn::Transform is a special intrinsic and should not be treated like the other intrinsic functions when doing deep merge.

Description of changes

The change is very small, just removing the Fn::Transform function from a list of keys that are treated differently during deep merge of properties and overrides.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Added unit tests that failed before the change and pass afterwards. Also saw correct behavior after the fix in the reproduction in the original issue with CfnInclude.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@ulrokx ulrokx requested a review from a team as a code owner November 26, 2025 19:45
@aws-cdk-automation aws-cdk-automation requested a review from a team November 26, 2025 19:45
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Nov 26, 2025
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

The intrinsic function `Fn::Transform` can be used anywhere in a CloudFormation
template which makes it special compared to the other intrinsic functions. In
order for CfnResources to have Fn::Transform as a property key, this intrinsic
needs to be merged like any other property.

aws#36203
@ulrokx ulrokx force-pushed the rikirk/fn-transform-merge branch from 5058a55 to 068b024 Compare November 26, 2025 20:10
@ulrokx ulrokx changed the title fix(core): Fn::Transform excluded in resource deep merge fix(core): Fn::Transform excluded in resource deep merge Nov 26, 2025
@ulrokx
Copy link
Copy Markdown
Author

ulrokx commented Nov 26, 2025

Exemption Request : change is to core resource synthesis logic and is tested by unit tests. integration test requires setting up CFN macro/lambda handler or bucket deployment and doesn't add much more than what the unit tests offer.

@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Nov 26, 2025
@pahud
Copy link
Copy Markdown
Contributor

pahud commented Dec 3, 2025

Thank you. I can confirm that this PR is now in the pr/needs-community-review queue. Once it receives an approving community review, it will move to the pr/needs-maintainer-review stage. Please ensure that the CI status remains in a Success state, as the maintainer will review it from that queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants