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

When insecure=true, the provider registry.terraform.io/smutel/netbox failed #228

Closed
draoullig opened this issue Oct 12, 2023 · 0 comments · Fixed by #229
Closed

When insecure=true, the provider registry.terraform.io/smutel/netbox failed #228

draoullig opened this issue Oct 12, 2023 · 0 comments · Fixed by #229
Assignees
Labels
bug Something isn't working

Comments

@draoullig
Copy link

Summary

panic: runtime error: invalid memory address or nil pointer dereference when insecure=true

Version

7.1.0

Netbox version

3.4.10

Terraform version

1.3.6

Provider version

v7.1.0

Issue details

Affected Data(s) / Resource(s)

Terraform Configuration Files

provider "netbox" {
 url  = "..."
 token   = ..."
 scheme = "https"
 insecure = true
}

Terraform Output

Error: Plugin did not respond
│ 
│   with provider["registry.terraform.io/smutel/netbox"],
│   on main.tf line 12, in provider "netbox":
│   12: provider "netbox" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ConfigureProvider call. The plugin logs may contain more details.

Behaviors

Actual Behavior

When insecure=true, the provider registry.terraform.io/smutel/netbox failed

Expected Behavior

If you change the line :
t.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = insecure
by
t.Transport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: insecure}
in provider.go
The parameter insecure=true runs correctly

Steps to Reproduce

  1. Set insecure=true in the provider's parameters
  2. terraform plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants