gpt4 book ai didi

aws-cloudformation - aws cloudformation - 资源属性错误

转载 作者:行者123 更新时间:2023-12-03 07:37:25 24 4
gpt4 key购买 nike

我已经这样定义了我的参数:

{
"PrivateSubnets":{
"Description":"db subnetlist",
"Type": "List<AWS::EC2::Subnet::Id>"
},

"VPCLIST": {
"Description": "VPC list",
"Type": "List<AWS::EC2::VPC::Id>"
}
}

并在“资源”部分引用上述参数,如下所示:

    "InstanceSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"VpcId" : {"Ref": "VPCLIST"} ,
"GroupDescription" : "Enable 3306/80/SSH access via port 22"
}

在执行此操作时,我收到以下错误。

AWS::EC2::SecurityGroup InstanceSecurityGroup“属性 VpcId 的值必须为字符串类型”

注意:我只有默认 VPC 可用,该 VPC 不被视为字符串?此问题的任何解决方案...

最佳答案

正确的方法是进行此更改:

{
"PrivateSubnets": {
"Description":"db subnetlist",
"Type": "AWS::EC2::Subnet::Id"
},
"VPCLIST": {
"Description": "VPC list",
"Type": "AWS::EC2::VPC::Id"
}
}

关于aws-cloudformation - aws cloudformation - 资源属性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45507057/

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