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

Nothing to update in cloudformation should not result in errors #14463

Merged
merged 1 commit into from
May 17, 2017
Merged

Nothing to update in cloudformation should not result in errors #14463

merged 1 commit into from
May 17, 2017

Conversation

ewbankkit
Copy link
Contributor

Fixes #5653.

If a CloudFormation stack is updated by Terraform but the template has not changed (for example the template_url attribute's value changes but the contents of the template have not changed), AWS returns an HTTP 400 error with message ValidationError: No updates are to be performed.
This should not be treated as an error by Terraform.

@ewbankkit
Copy link
Contributor Author

Acceptance test:

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFormation_withUrl_withParams_noUpdate'

@ewbankkit
Copy link
Contributor Author

The acceptance test changes the template_url value so required some refactoring of resource_aws_cloudformation_stack_test.go.

@grubernaut
Copy link
Contributor

Hey @ewbankkit, thanks for this!

Would you be able to paste the output of the acceptance test run? Thanks!

@ewbankkit
Copy link
Contributor Author

All acceptance tests for CloudFormation stack:

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFormation_'==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/16 18:40:25 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudFormation_ -timeout 120m
=== RUN   TestAccAWSCloudFormation_basic
--- PASS: TestAccAWSCloudFormation_basic (69.10s)
=== RUN   TestAccAWSCloudFormation_yaml
--- PASS: TestAccAWSCloudFormation_yaml (68.37s)
=== RUN   TestAccAWSCloudFormation_defaultParams
--- PASS: TestAccAWSCloudFormation_defaultParams (68.67s)
=== RUN   TestAccAWSCloudFormation_allAttributes
--- PASS: TestAccAWSCloudFormation_allAttributes (67.92s)
=== RUN   TestAccAWSCloudFormation_withParams
--- PASS: TestAccAWSCloudFormation_withParams (128.97s)
=== RUN   TestAccAWSCloudFormation_withUrl_withParams
--- PASS: TestAccAWSCloudFormation_withUrl_withParams (164.96s)
=== RUN   TestAccAWSCloudFormation_withUrl_withParams_withYaml
--- PASS: TestAccAWSCloudFormation_withUrl_withParams_withYaml (92.93s)
=== RUN   TestAccAWSCloudFormation_withUrl_withParams_noUpdate
--- PASS: TestAccAWSCloudFormation_withUrl_withParams_noUpdate (120.14s)
    PASS

The test added for this PR is the final one, TestAccAWSCloudFormation_withUrl_withParams_noUpdate.

Copy link
Contributor

@grubernaut grubernaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ghost
Copy link

ghost commented Apr 12, 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 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nothing to update in cloudformation should not result in errors
3 participants