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

provider/google: Make google_compute_autoscaler use Update instead of Patch. #15101

Merged

Conversation

rileykarson
Copy link
Contributor

It looks like our vendored code thinks that Patch has "autoscaler" as an optional field, but the documentation suggests that it is required. It probably regressed when we vendored a new copy of the client code around a month ago.

We didn't catch this because the _update test didn't perform an Update - it performed a Destroy followed by a Create instead. This PR updates the tests so that an actual Update is performed.

Patch doesn't make much sense in this context - we pass in an entire copy of the resource, so we should be using Update anyways.

Fixes: #15056
@danawillow

@stack72
Copy link
Contributor

stack72 commented Jun 6, 2017

Hi @rileykarson

thanks for this work - this is a great change

% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeAutoscaler'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/06 15:12:23 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeAutoscaler -timeout 120m
=== RUN   TestAccComputeAutoscaler_importBasic
--- PASS: TestAccComputeAutoscaler_importBasic (136.75s)
=== RUN   TestAccComputeAutoscaler_basic
--- PASS: TestAccComputeAutoscaler_basic (122.07s)
=== RUN   TestAccComputeAutoscaler_update
--- PASS: TestAccComputeAutoscaler_update (148.29s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/google	407.126s

Paul

@ghost
Copy link

ghost commented Apr 11, 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 11, 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.

google_compute_autoscaler: Error 400: Required field 'autoscaler' not specified
2 participants