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
RFC 0009: Adding looping functionality in CFN Template (Fn::For) #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see comment shared internally)
* The collection to iterate on. It should be a List. You can either in-place the collection itself or reference List type parameter values from Parameters section. | ||
* `TemplateSnippet` | ||
* The template snippet to replicate for each item in iteration. | ||
* (Conditional) `LogicalId` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be called LogicalId
. Fn::For
is not only allowed to be used in the context of resources. It's a generic function that could work in any array or JSON object (you even talk about it being used in the Output object in the description), so this parameter should be called something like ObjectKey
and the description should be changed to not be specific to resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a different opinion. Fn::For
is supposed to work like a generic function, but LogicalId
is required only when the function is used for replicating either Resource or Output, which is already described so in the section.
CloudFormation calls an identifier of Output also as "Logical Id". Therefore, I would prefer keeping the parameter name as LogicalId
gives better impression of its characteristic being "Conditional": it has to be defined only for Resource or Output.
We had to recreate this PR because the fork it was based on was detached when we switched this repo to public. This RFC can now be tracked here: #75 |
Language Enhancement Request For Comment
This is a request for comments about a new Language Extensions intrinsic function
Fn::For
. See TRACKING_ISSUE foradditional details.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.