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

fix bool vs Compatibool ref used in flattenBackends #12538

Merged
merged 3 commits into from
Mar 24, 2017

Conversation

jonoden
Copy link
Contributor

@jonoden jonoden commented Mar 8, 2017

The gofastly.Compatibool reference being used in flattenBackends was causing a type mismatch, as gofastly.Backend uses bool (It's UpdateBackendInput and CreateBackendInput that use gofastly.Compatibool).

Problem during importing a backend:

2017/03/07 20:56:50 [DEBUG] plugin: terraform-provider-fastly: 2017/03/07 20:56:50 [WARN] Error setting Backends for (xxxxxxxxxxxxxxxxxxxx): backend.0.ssl_check_cert: '' expected type 'bool', got unconvertible type '*fastly.Compatibool'

struct used in flattenBackends(backendList []*gofastly.Backend) []map[string]interface{}
https://github.com/hashicorp/terraform/blob/master/vendor/github.com/sethvargo/go-fastly/backend.go#L9

Test run:

$ make testacc TEST=./builtin/providers/fastly TESTARGS='-run=TestResourceFastlyFlattenBackend'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/08 15:53:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/fastly -v -run=TestResourceFastlyFlattenBackend -timeout 120m
=== RUN   TestResourceFastlyFlattenBackend
--- PASS: TestResourceFastlyFlattenBackend (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/fastly	0.019s

@jonoden jonoden changed the title fix bool vs Compatibool ref used in flattendBackends fix bool vs Compatibool ref used in flattenBackends Mar 8, 2017
@catsby
Copy link
Contributor

catsby commented Mar 24, 2017

Thank you @jonoden ! Sorry for the delay here, I had trouble reproducing at first but the problem was on my end. I've confirmed this patch is a fix, thanks again!

@catsby catsby merged commit c18ad6e into hashicorp:master Mar 24, 2017
@jonoden jonoden deleted the fastly-compatibool branch March 24, 2017 22:09
@ghost
Copy link

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

3 participants