1 Answer
- Newest
- Most votes
- Most comments
3
Hi Ashwani,
This is not the nice way of doing but you may find it useful if you really want to make it as dynamic parameterization. Here is what you may consider doing it to achieve the end result:
1. First change:
PerformaceTenantHostName:
Type: String
Default: '["Beta1","Alpha1"]'
Description: The tenant host name list
2. Second Change
Pattern: !Sub '{ "body" : { "TenantHostName" : [ { "anything-but": ${PerformaceTenantHostName} } ] }}'
I was able to do it this way, with same end result. Attaching snapshots for your reference:
- When parameters values were hardcoded as below:
- Pattern: '{ "body" : { "TenantHostName" : [ { "anything-but": ["Beta1","Alpha1"] } ] }}'
- When parameters were passed in Sub functions as below:
- Pattern: !Sub '{ "body" : { "TenantHostName" : [ { "anything-but": ${PerformaceTenantHostName} } ] }}'
Thanks above solution working fine. Can we use SSM parameter after creating inside Pattern ? Eg.
- Pattern: !Sub '{ "body" : { "TenantHostName" : [ { "anything-but": {{ssm:PerformaceTenantHostName}} } ]}}'
Let me check on this. I'll update you here in sometime.
Relevant content
- asked 8 months ago
- asked a year ago
- asked 25 days ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
Try with the following syntax,
Pattern: '{ "body" : { "TenantHostName" : [ { "anything-but": [ {"Ref": "PerformaceTenantHostName"} ] } ] } }'