1回答
- 新しい順
- 投票が多い順
- コメントが多い順
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.
Try with the following syntax,
Pattern: '{ "body" : { "TenantHostName" : [ { "anything-but": [ {"Ref": "PerformaceTenantHostName"} ] } ] } }'