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

panic: interface conversion: interface {} is nil, not map[string]interface {} #1231

Closed
tomwilkie opened this issue Mar 20, 2018 · 4 comments · Fixed by #1232
Closed

panic: interface conversion: interface {} is nil, not map[string]interface {} #1231

tomwilkie opened this issue Mar 20, 2018 · 4 comments · Fixed by #1232
Assignees

Comments

@tomwilkie
Copy link

I get this error when I try and apply this config:

resource "google_compute_backend_service" "backend_service" {
  ...
  iap {
    oauth2_client_id     = ""
    oauth2_client_secret = ""
  }
}

Version terraform-provider-google_v1.7.0_x4

panic: interface conversion: interface {} is nil, not map[string]interface {}
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: goroutine 251 [running]:
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/google.expandIap(...)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_backend_service.go:300
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/google.expandBackendService(0xc42035c230, 0xc420570920, 0x1000010644e5, 0x58)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_backend_service.go:415 +0xce3
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/google.resourceComputeBackendServiceCreate(0xc42035c230, 0x216ec60, 0xc4201a2b40, 0xc42035c230, 0x0)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_backend_service.go:179 +0x58
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc420307a40, 0xc4207b80a0, 0xc420794980, 0x216ec60, 0xc4201a2b40, 0x1, 0xc4204dca50, 0xc4202e46f0)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:227 +0x364
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc42034eee0, 0xc4207b8050, 0xc4207b80a0, 0xc420794980, 0x33be458, 0x0, 0xc42034eee0)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0xa4
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc4207a59e0, 0xc420794500, 0xc4207262d0, 0x0, 0x0)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:527 +0x57
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: reflect.Value.call(0xc420428a80, 0xc42000c830, 0x13, 0x24702a9, 0x4, 0xc420570f20, 0x3, 0x3, 0xc420445ee8, 0xc4201d4028, ...)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/usr/local/go/src/reflect/value.go:434 +0x905
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: reflect.Value.Call(0xc420428a80, 0xc42000c830, 0x13, 0xc420445f20, 0x3, 0x3, 0xc400000005, 0x0, 0xc420429740)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/usr/local/go/src/reflect/value.go:302 +0xa4
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: net/rpc.(*service).call(0xc4208f9400, 0xc4206c43c0, 0xc42079a3c0, 0xc42068c180, 0xc4207c8560, 0x202f800, 0xc420794500, 0x16, 0x202f840, 0xc4207262d0, ...)
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/usr/local/go/src/net/rpc/server.go:381 +0x142
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: created by net/rpc.(*Server).ServeCodec
2018-03-20T17:06:09.735-0400 [DEBUG] plugin.terraform-provider-google_v1.7.0_x4: 	/usr/local/go/src/net/rpc/server.go:475 +0x36b
@ghost ghost added bug crash labels Mar 20, 2018
@danawillow danawillow self-assigned this Mar 20, 2018
@paddycarver
Copy link
Contributor

I traced this a bit, the error is in line 467 of resource_compute_backend_service.go, but I see @danawillow has assigned herself, so I'll drop this here and then back away. :)

@danawillow
Copy link
Contributor

lol @paddycarver too slow 😛

@tomwilkie just curious (while I work on a fix), what's your use case for setting both fields to the empty string?

@tomwilkie
Copy link
Author

No good use case; I was trying to optionally enable Iap in a module by leaving it blank. Thanks for the fix!

@ghost
Copy link

ghost commented Nov 19, 2018

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants