-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow AWS::NoValue to omit Role property in if - FeatureRequest#3728 #3736
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
base: develop
Are you sure you want to change the base?
Conversation
We discussed offline. But this solution assumes that the value of the parameters and condition will be known at the time of the transform (which is not). It works when trying locally (because it will use the default values), but when actually deployed and working, SAM doesn't know about the parameters values, therefore there won't be nothing to resolve and these changes won't work. The solution is to implement extra logic that keeps the conditions, but takes into account both options depending on the values, to define if it will create a role or not. Generated template should be like this:
Existing code where a similar situation is used for destinations here |
@SherrryX Hello, thank you for your work on this PR! Could you please update based on Renato's comment so we can merge this? |
3728 #, if available
Allow AWS::NoValue to omit Role property in Fn::If
I have validated the changes with unit tests and hand testing with
bin/sam-translate.py
. The change resolved my need in #3728.Checklist
Examples?
Please reach out in the comments if you want to add an example. Examples will be
added to
sam init
through aws/aws-sam-cli-app-templates.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.