1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 您好,在这种情况下,建议使用Fn::Sub 内在函数 [1]。您可以定义一个类似以下的参数:
Enviroment: Type: String Default: "dev" AllowedValues: - "dev" - "uat" - "prod"
然后在 AWS::DMS::Endpoint 资源中,对于 'EndpointIdentifier' 选项,可以像这样定义它:
Description: "Endpoint test" Resources: BasicEndpoint: Type: "AWS::DMS::Endpoint" Properties: .... EndpointIdentifier: !Sub 'fp-epk-${Environment}-dms-target' .... ....
这将使用所选 Environment 参数的值填充伪参数 ${Environment}。
希望对您有用。如果您还有其他问题,请告诉我!
参考资料:
[1]https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 10 个月前