gpt4 book ai didi

json - AWS : Cloud Formation: Is it possible to use multiple "DependsOn"?

转载 作者:行者123 更新时间:2023-12-02 06:56:20 25 4
gpt4 key购买 nike

假设我有这个示例模板:

{
"AWSTemplateFormatVersion" : "2010-09-09",
"Mappings" : {
"RegionMap" : {
"us-west-1" : { "AMI" : "ami-655a0a20" },
...
}
},
"Resources" : {
"Ec2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
...
},
"DependsOn" : "myDB"
},
"myDB" : {
"Type" : "AWS::RDS::DBInstance",
"Properties" : {
...
}
},
"myDB2" : {
"Type" : "AWS::RDS::DBInstance",
"Properties" : {
...
}
}
}
}

是否可以以任何方式指定多个 DependsOn?如果有这样的想法那就太好了:

"DependsOn" : ["myDB", "myDB2"]

正常的方法是什么?

最佳答案

是的,

The DependsOn attribute can take a single string or list of strings.

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html

语法:

"DependsOn" : [ String, ... ]

关于json - AWS : Cloud Formation: Is it possible to use multiple "DependsOn"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21985994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com