aws cloudformation deploy not maintain stack parameters
With latest version of awscli, cloudformation deploy not maintain stack parameters. aws cloudformation deploy get template defaults instead of stack parameters.
With aws-cli/1.11.19 and botocore/1.4.83 are working correctly.
Could you post debug logs of the command you are running? You could do so by appending --debug to the command you ran.
Uploaded file output.txt
Similar issue opened #2466 closing that one in favor of this one.
I'm seeing this issue as well.
Still an issue in 1.11.79.
Fixed in https://github.com/aws/aws-cli/pull/2573.
I'm not sure if this was fixed, when using example from https://github.com/aws/aws-cli/issues/2466 I value from stack is overridden with default in version 1.11.83
aws --version
aws-cli/1.11.83 Python/2.7.12+ Linux/4.10.0-21-generic botocore/1.5.46
I created following template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Test stack",
"Parameters" : {
"TestParam2" : {
"Description" : "Test param 2",
"Type" : "String",
"Default": "exampledefault"
}
},
"Resources" : {
"examplebucket" : {
"Type" : "AWS::S3::Bucket",
"Properties": {
"BucketName": { "Ref" : "TestParam2" }
}
}
}
}
Then created a new stack with
aws cloudformation create-stack --stack-name aws-cli-test-s3 --template-body file://test.json
As expected, now I have S3 Bucket 'exampledefault'. Then I updated the stack with '--parameters ParameterKey=TestParam2,ParameterValue=exampleoverride',
aws cloudformation update-stack --stack-name aws-cli-test-s3 --template-body file://test.json --parameters ParameterKey=TestParam2,ParameterValue=exampleoverride
As expected, now I have S3 Bucket 'exampleoverride'. Then I updated stack again without explicitly defining 'TestParam2'
aws cloudformation update-stack --stack-name aws-cli-test-s3 --template-body file://test.json
Now 'exampleoverride' got deleted and 'exampledefault' was created.
I was expecting that the value set with '--parameters ParameterKey=TestParam2,ParameterValue=exampleoverride' would be preserved.