Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

mingujo
Copy link
Contributor

@mingujo mingujo commented May 2, 2022

Language Enhancement Request For Comment

This is a request for comments about a new Language Extensions intrinsic function Fn::For. See TRACKING_ISSUE for
additional details.


Licensing

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

@mingujo mingujo self-assigned this May 2, 2022
@mingujo mingujo added the approved RFC PR approved by CFN engineers label May 2, 2022
@mingujo mingujo removed the approved RFC PR approved by CFN engineers label May 4, 2022
@mingujo mingujo assigned MalikAtalla-AWS and unassigned mingujo May 6, 2022
Copy link
Contributor

@MalikAtalla-AWS MalikAtalla-AWS left a 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)

RFCs/0009-Fn::For.md Outdated Show resolved Hide resolved
gunach
gunach previously approved these changes May 6, 2022
RFCs/0009-Fn::For.md Outdated Show resolved Hide resolved
* 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`
Copy link
Contributor

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.

Copy link
Contributor Author

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.

RFCs/0009-Fn::For.md Show resolved Hide resolved
RFCs/0009-Fn::For.md Show resolved Hide resolved
@mingujo mingujo reopened this May 13, 2022
@mingujo mingujo closed this May 13, 2022
@MalikAtalla-AWS
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants