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

Fn::Size intrinsic template function #61

Closed
josb opened this issue Oct 4, 2019 · 7 comments
Closed

Fn::Size intrinsic template function #61

josb opened this issue Oct 4, 2019 · 7 comments
Labels
feature request Proposal for new features or requests

Comments

@josb
Copy link

josb commented Oct 4, 2019

Scope of request

AWS CloudFormation templates.

Expected behavior

Fn::Size should return the number of elements in a list (the result of Fn::Split, or a CommaDelimitedList parameter).

Test case recommendation

If you combine this with the Fn::Split function it will allow you to see how many items were entered when someone has a CommaDelimitedList parameter, which is helpful when it comes to Conditionals:
{ "Fn::Size" : { "Fn::Split" : [ "delimiter", "source string" ] } }

Links to existing API doc

https://www.kencochrane.net/2017/03/25/my-cloudformation-wishlist/

Category

  1. Other (IoT, Migration, Budgets...)
@lejiati
Copy link
Contributor

lejiati commented May 10, 2022

@josb Thank you very much for your feedback! Since this repository is focused on resource coverage, I'm transferring this issue over to a new GitHub repository dedicated to CloudFormation template language issues.

@lejiati lejiati transferred this issue from aws-cloudformation/cloudformation-coverage-roadmap May 10, 2022
@muneebar muneebar added feature request Proposal for new features or requests and removed enhancement New feature or request labels May 10, 2022
@muneebar
Copy link

muneebar commented May 12, 2022

@josb Thanks for bringing this to our attention. Stay tuned for updates!

@muneebar muneebar reopened this May 12, 2022
@MalikAtalla-AWS
Copy link
Contributor

Hi all, we have opened an RFC (here) to address this use case. Any feedback is welcome.

@josb
Copy link
Author

josb commented May 18, 2022

Thanks to all helping to submit this RFC!

@lejiati
Copy link
Contributor

lejiati commented Aug 25, 2022

Hey @josb, really appreciate your feedback and feature proposal. I'm happy to share that Fn::Length, a new intrinsic function which returns length of a list is now available (more details can be found here).

Please feel free to try it out and leave your feedback!

@josb
Copy link
Author

josb commented Aug 25, 2022

Hello @lejiati, we'll try the new function, thanks for making this happen!

@josb josb closed this as completed Aug 27, 2022
@josb
Copy link
Author

josb commented Aug 27, 2022

Fn::Length is now available, hence closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Proposal for new features or requests
Projects
None yet
Development

No branches or pull requests

5 participants