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公式更新しました 3年前
- AWS公式更新しました 3ヶ月前