如何将yamel文件内容传递到云形成嵌套堆栈?

时间:2018-12-05 20:57:35

标签: amazon-web-services amazon-ec2 yaml amazon-cloudformation

我以多种方式尝试了这一点:

 aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile="$(cat config.yaml)"

 aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile=fileb://config.yaml

但是没有用。有什么好方法并且众所周知吗?

1 个答案:

答案 0 :(得分:0)

您目前无法以YAML格式传递参数。这是commonly requested feature

一种选择是使用parameters参数以JSON格式传递参数:

--parameters params.json

params.json:

[
    {
        "ParameterKey": "Foo",
        "ParameterValue": "Bar"
    }
]