-
Notifications
You must be signed in to change notification settings - Fork 13
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 for Fn::Length #72
Conversation
@juegong2 Make sure to send a separate PR to update the README adding this RFC to the table. |
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.
Great first draft. No issues with syntax. Just want to make sure we include some clarifications on limitations.
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.
2 minor comments, then it should be good to go!
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.
Looks good. Thanks for iterating!
I'd suggest |
README.md
Outdated
@@ -11,6 +11,7 @@ Go to: [What is an RFC](#what-is-an-rfc) | [RFC Process](#rfc-process) | |||
[9](https://github.com/aws-cloudformation/cfn-language-discussion/issues/9)|[Adding looping functionality in CFN Template](https://github.com/aws-cloudformation/cfn-language-discussion/pull/19)|[@MalikAtalla-AWS](https://github.com/MalikAtalla-AWS)|✍️ review | |||
[14](https://github.com/aws-cloudformation/cfn-language-discussion/issues/14)|[Convert Template Block to JSON String](https://github.com/aws-cloudformation/cfn-language-discussion/pull/15)|[@mluk-aws](https://github.com/mluk-aws)|✍️ review | |||
[11](https://github.com/aws-cloudformation/cfn-language-discussion/issues/11)|[Allow Intrinsic Functions and Pseudo-Parameter References in DeletionPolicy and UpdateReplacePolicy](https://github.com/aws-cloudformation/cfn-language-discussion/pull/21)|[@MalikAtalla-AWS](https://github.com/MalikAtalla-AWS)|✍️ review | |||
[70](https://github.com/aws-cloudformation/cfn-language-discussion/issues/70)|[Adding Fn::Size support in CFN Template](https://github.com/aws-cloudformation/cfn-language-discussion/pull/72)|[@juegong2](https://github.com/juegong2)|✍️ review |
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.
Can you put this change in a separate PR? If you couple it with this one it won't get added to the README until after it's fully approved which doesn't make a lot of sense, since it's in review right now.
@lorengordon I'm fine with the identifier |
Create RFC for Fn::Size
Some data to support that "length" tends to be more popular than "size":
|
Updated the naming of the new intrinsic function to Fn::Length |
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.
Can you rename the RFC file as well?
File name is updated as well |
I'm not sure if I understand the use case of this function:
|
RFCs/0070-Fn::Length.md
Outdated
``` | ||
because the ARN of MyBucket is not known until during provisioning. | ||
|
||
**Note:** This is a short-term limitation due to underlying implementation constraints. In the fullness of time, this limitation should be removed. |
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 would remove this note, or be very careful about wording. Promising a short-term solution and not meeting this self-imposed deadline is a good way to lose trust.
Additionally, getting this to be useful during provisioning looks complex from the outside:
Having !Length work during provisioning does seem similar to how other functions work (so short term might be okay here)
However, most use cases will expect to be able to use an !If with !Length, and this would be a major change in how CloudFormation works. Currently in the If documentation, there is this remark.
You can only reference other conditions and values from the Parameters and Mappings sections of a template. For example, you can reference a value from an input parameter, but you can't reference the logical ID of a resource in a condition.
Repeating that in the limitations here might be a good idea too
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.
Thanks for your feedback! I have updated the wording of this note.
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.
👍🏻
Rename Fn::Size to Fn::Length Co-Authored-By: Malik <[email protected]>
Co-authored-by: Malik <[email protected]>
Language Enhancement Request For Comment
This is a request for comments about new intrinsic function Fn::Size. See #70 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.