aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

aws cloudformation deploy not maintain stack parameters

Open agutierrezdapda opened this issue 9 years ago • 7 comments

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.

agutierrezdapda avatar Feb 23 '17 08:02 agutierrezdapda

Could you post debug logs of the command you are running? You could do so by appending --debug to the command you ran.

kyleknap avatar Feb 25 '17 00:02 kyleknap

Uploaded file output.txt

agutierrezdapda avatar Feb 27 '17 15:02 agutierrezdapda

Similar issue opened #2466 closing that one in favor of this one.

stealthycoin avatar Mar 16 '17 22:03 stealthycoin

I'm seeing this issue as well.

kadrach avatar Apr 03 '17 03:04 kadrach

Still an issue in 1.11.79.

oleyka avatar Apr 21 '17 17:04 oleyka

Fixed in https://github.com/aws/aws-cli/pull/2573.

dstufft avatar Apr 28 '17 20:04 dstufft

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.

jyrkiput avatar May 05 '17 04:05 jyrkiput