gpt4 book ai didi

amazon-web-services - 是否可以将参数文件传递到 AWS::CloudFormation::Stack

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

我需要将 .json 文件中设置的参数传递给 AWS::CloudFormation::Stack 资源。该文件可以位于 S3 存储桶中,也可以上传到 aws cloud shell 中。我可以使用 json 文件中的参数执行 aws cloudformation create-stack,如下所示:

aws cloudformation create-stack --stack-name VPC --template-body file://VPC.yml --parameters file://VPC-parameters.json

我的 VPC-parameters.json 文件如下所示:

[
{
"ParameterKey": "VPCId",
"ParameterValue": "demoVPC1ID"
},
{
"ParameterKey": "GatewayId",
"ParameterValue": "demoGatewayID"
}
]

也期望 AWS::CloudFormation::Stack 的参数属性中有类似的内容。

我只尝试了 aws cloudformation create-stack 命令,该命令与参数 json 文件配合良好。但不知道如何将其传递到 AWS::CloudFormation::Stack 资源

最佳答案

But do not know how to pass this in a the AWS::CloudFormation::Stack resource

这是不可能的。 CloudFormation 不支持将文件传递到 AWS::CloudFormation::Stack

关于amazon-web-services - 是否可以将参数文件传递到 AWS::CloudFormation::Stack,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74353662/

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