AWS SSM Parameters - How to expand lists within Allowed Values

0

Hello,
This question is referencing a thread kidnap that was never answered here:

https://forums.aws.amazon.com/thread.jspa?messageID=982615﹗

By user longman

And taking it a little further.

If I can export the Resolved Value of a AWS::SSM::Parameter::Value<List<String>> SSM parameter by doing:
Parameters:
Test:
Type : AWS::SSM::Parameter::Value<List<String>>
Default: List_of_Values
Outputs:
ParameterList:
Description: The first CIDR block of the Parameter Store value
Value: !Join [ ",", !Ref Test ]
Export:
Name: ParameterListString

Why can't I use that Parameter List to Resolve to a list in Allowed Values?
Parameters:
Options:
Type: String
AllowedValues: !Ref Test
Is a very basic use case, displaying a SSM Parameter as a list to the user when running the Cloud Formation stack. Why is there no documentation in AWS about how to do this. Not in the Official AWS blogs, not in the support documents, not in the AWS CF Manual, not in third party blogs. NOWHERE there's an example of using AWS::SSM::Parameter::Value<List<String>>.

Please provide one that is not as obvious as Importing the parameter and then using it as a Resource Property, we need the use case where a StringList SSM Parameter can be converted to a List in AWS for a user to choose a value from. Thank You!

asked 3 years ago1310 views
1 Answer
0

I just replied to this but tokens broke the connection.
Talked to AWS Support.

In short is NOT possible using CF alone.

1.-CF template variables are RENDERED/Evaluated ONLY when the CF template is executed, that is when the deployment actually happens.
2.-You can STILL force CF variables to the rendered if you use Nested CF templates.
3.-Nested CF templates DO NOT support list values, only Comma Delimitted Lists, this is not useful for allowing a user to choose a value.

Instead, you have to use a CF template Rendering API like Python's Troposphere or AWS' own CDK to do what's requested here.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions