ssm.StringListParameter does not have version parameter
See original GitHub issueNote: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.
-
I’m submitting a …
- 🪲 bug report
- 🚀 feature request
- 📚 construct library gap
- ☎️ security issue or vulnerability => Please see policy
- ❓ support request => Please see note at the top of this template.
-
What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
At the moment StringListParameter class has fromStringListParameterName parameter is rendered using CfnDynamicReference
As a result ssm.StringListParameter.string_list_value
creates AWS Cloudformation code block like this:
{
"Fn::Split": [
",",
"{{resolve:ssm:parameter-name}}"
]
}
- What is the expected behavior (or behavior of feature suggested)? Accoring to AWS CloudFormation documentation in block SSM Parameters:
For SSM Parameters, the reference-key segment is composed of the parameter name and version number. Use the following pattern: ‘{{resolve:ssm:parameter-name:version}}’ Your reference must adhere to the following regular expression pattern for parameter-name and version: ‘{{resolve:ssm:[a-zA-Z0-9_.-/]+:\d+}}’
That means that StringListParameter should have parameter-name and version. At the moment aws cdk renders parameter-name only.
- What is the motivation / use case for changing the behavior or adding this feature?
AWS Cloudformation shows Validation error
ValidationError: Incorrect format is used in the following SSM reference: [{{resolve:ssm:parameter-name}}] Incorrect format is used in the following SSM reference: [{{resolve:ssm:parameter-name}}]
-
Please tell us about your environment:
- CDK CLI Version: 1.3.0
- Module Version: 1.3.0
- OS: [Ubuntu]
- Language: [Python]
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
ValidationError: Incorrect format is used in the following SSM reference: [{{resolve:ssm:parameter-name}}]
at Request.extractError (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/home/user/.nvm/versions/node/v10.16.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top GitHub Comments
I ran into this as well. It makes using
StringListParameter
in CDK impossible, currently. Any plan to fix this?The workaround for me is to use a
StringParameter
with comma-separated values and to the splitting and joining myself.This isn’t just a
python
issue, happening withtypescript
as well. I tried the following which does give me a validcloudformation
template but this wont work due to limitiations and buggy behaviour with howcloudformation
executes rather thanaws-cdk