问题
I tried this in many ways:
aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile="$(cat config.yaml)"
and
aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile=fileb://config.yaml
but it didn't work. is there a good way and known to do that?
回答1:
You can't currently pass your parameters in YAML format. It's a commonly requested feature.
One alternative is to pass your parameters in JSON format using the parameters argument:
--parameters params.json
params.json:
[
{
"ParameterKey": "Foo",
"ParameterValue": "Bar"
}
]
来源:https://stackoverflow.com/questions/53640618/how-to-pass-yamel-file-content-to-cloud-formation-nested-stack