-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addPropertyOverride() does not seem to work #2677
addPropertyOverride() does not seem to work #2677
Comments
Try to use camel case: This is actually not the intended behavior and we should fix, but in the meantime, I hope this will allow you to workaround the issue. |
Resource overrides (`addOverride` and `addPropertyOverride`) should be applied after rendering properties at the L1 level. Otherwise, validation and capitalization changes would be applied to overrides and this contradicts the idea of being able to specify arbitrary overrides as "patches" to the synthesized resource. The previous behavior had two adverse effects: 1. If a property was unknown, it would be omitted from the resource 2. Properties names would need to be capitalized in camel case instead of 1:1 with the CFN schema. Fixes #2677 BREAKING CHANGE: Properties passed to `addPropertyOverride` should match in capitalization to the CloudFormation schema (normally pascal case). For example, `addPropertyOverride('accessControl', 'xxx')` should now be `addPropertyOverride('AccessControl', 'xxx')`.
Resource overrides (`addOverride` and `addPropertyOverride`) should be applied after rendering properties at the L1 level. Otherwise, validation and capitalization changes would be applied to overrides and this contradicts the idea of being able to specify arbitrary overrides as "patches" to the synthesized resource. The previous behavior had two adverse effects: 1. If a property was unknown, it would be omitted from the resource 2. Properties names would need to be capitalized in camel case instead of 1:1 with the CFN schema. Fixes #2677 BREAKING CHANGE: Properties passed to `addPropertyOverride` should match in capitalization to the CloudFormation schema (normally pascal case). For example, `addPropertyOverride('accessControl', 'xxx')` should now be `addPropertyOverride('AccessControl', 'xxx')`.
I am facing a similar issue when trying to override Path property on an instance profile. I do not see path getting attached to my resource generated on cfn. `if (node instanceof iam.CfnInstanceProfile ) {
Produces ... Could you please advise on what am i missing here to add Path to instance profile? Thanks |
Describe the bug
addPropertyOverride
does not seem to workTo Reproduce
Synthetize the following stack:
yields the following:
Note that
AccessControl
is absent from the synth output.Expected behavior
AccessControl: "bucket-owner-read"
should be seen in the synth outputVersion:
The text was updated successfully, but these errors were encountered: