Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_cloudformation_stack update doesn't send parameters if paremeters are not modified #4913

Closed
rmazlumyan opened this issue Jan 30, 2016 · 2 comments
Assignees

Comments

@rmazlumyan
Copy link

When performing an update to a cloudformation stack, parameters are only sent if they are modified. This results in the following error:

* aws_cloudformation_stack.vpc: ValidationError: Parameters: [ZoneName] must have values
    status code: 400, request id: 2794fb5d-c6ea-11e5-bb25-f7d7bfdc24bc

The following stack is created on initial run:

resource "aws_cloudformation_stack" "vpc" {
    name = "dev-vpc"
    template_url = "https://s3.amazonaws.com/${var.template_bucket}/CreateVPC.json"
    on_failure = "ROLLBACK"
    parameters {
        CreateNewZone = "false"
        VPCName = "dev-us-west-2"
        ZoneName = "mydomain.com"
    }
}

After updating the template_url

resource "aws_cloudformation_stack" "vpc" {
    name = "dev-vpc"
    template_url = "https://s3.amazonaws.com/${var.template_bucket}/CreateVPC.json?versionId=hwUzxuE55wT2qLtwDyK3a7GBcHYzEvaQ"
    on_failure = "ROLLBACK"
    parameters {
        CreateNewZone = "false"
        VPCName = "dev-us-west-2"
        ZoneName = "mydomain.com"
    }
}

and running apply the following is seen in the error log:

2016/01/29 17:01:12 [DEBUG] apply: aws_cloudformation_stack.vpc: executing Apply
2016/01/29 17:01:12 [DEBUG] terraform-provider-aws: 2016/01/29 17:01:12 [DEBUG] Updating CloudFormation stack: {
2016/01/29 17:01:12 [DEBUG] terraform-provider-aws:   StackName: "dev-vpc",
2016/01/29 17:01:12 [DEBUG] terraform-provider-aws:   TemplateURL: "https://s3.amazonaws.com/mycloudformation/CreateVPC.json?versionId=hwUzxuE55wT2qLtwDyK3a7GBcHYzEvaQ"
2016/01/29 17:01:12 [DEBUG] terraform-provider-aws: }
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalWriteState
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalApplyProvisioners
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalIf
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalWriteDiff
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalIf
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalWriteState
2016/01/29 17:01:13 [DEBUG] root: eval: *terraform.EvalApplyPost
2016/01/29 17:01:13 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* aws_cloudformation_stack.vpc: ValidationError: Parameters: [ZoneName] must have values
        status code: 400, request id: f52d821f-c6ec-11e5-94bf-29cecbcddbfb
2016/01/29 17:01:13 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
olegch added a commit to olegch/terraform that referenced this issue Feb 12, 2016
…n't send parameters if paremeters are not modified
olegch added a commit to olegch/terraform that referenced this issue Feb 23, 2016
…n't send iam_capabilities when not modified
olegch added a commit to olegch/terraform that referenced this issue Feb 23, 2016
…eters nor capabilities if they are not modified;

build script updated to enable building specified module(s) for specified OS(s) and architecture(s)
olegch added a commit to olegch/terraform that referenced this issue Feb 23, 2016
…eters nor capabilities if they are not modified;

build script updated to enable building specified module(s) for specified OS(s) and architecture(s)
@radeksimko radeksimko self-assigned this Mar 12, 2016
@radeksimko
Copy link
Member

Hi @rmazlumyan ,
thanks for the report.

This was just fixed with @olegch's help and merged in #5603 which will be part of the next release.

@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants