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.
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前
Try with the following syntax,
Pattern: '{ "body" : { "TenantHostName" : [ { "anything-but": [ {"Ref": "PerformaceTenantHostName"} ] } ] } }'