【问题标题】:How to pass yamel file content to cloud formation nested stack?如何将 yaml 文件内容传递给 cloudformation 嵌套堆栈?
【发布时间】:2019-05-07 12:19:20
【问题描述】:

我尝试了很多方法:

 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

但它没有用。有没有好的方法和已知的做到这一点?

【问题讨论】:

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


    【解决方案1】:

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

    另一种方法是使用 parameters 参数以 JSON 格式传递参数:

    --parameters params.json

    params.json:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-21
      • 2020-06-28
      • 1970-01-01
      • 2016-07-10
      • 2017-05-16
      • 2020-10-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多