【发布时间】:2023-03-12 18:13:01
【问题描述】:
我有一个带有 2 个参数的 CloudFormation 模板。我想为第二个参数设置一个 AllowedPattern 值,以便它的正则表达式根据第一个参数的值动态生成。像这样的:
CloudFormation Parameters
WebsiteDomain:
Type: String
EmailAddress:
Type: String
AllowedPattern: !Sub '.*@${WebsiteDomain}'
Allowed Input
WebsiteDomain: google.com
EmailAddress: test@google.com
Disallowed Input
WebsiteDomain: google.com
EmailAddress: test@yahoo.com
有没有办法做到这一点?
【问题讨论】:
标签: regex amazon-web-services amazon-cloudformation