equinix / terraform-provider-equinix

Terraform Equinix provider
https://deploy.equinix.com/labs/terraform-provider-equinix/
MIT License
46 stars 45 forks source link

[Bug]: Panic deleting network acl template #750

Open ocobles opened 3 months ago

ocobles commented 3 months ago

Terraform Version

Terraform v1.5.7 on darwin_arm64

Equinix Provider Version

Effected Terraform Resources

equinix_network_acl_template

Terraform Config Files

No response

Debug Output

No response

Panic Output

equinix_network_acl_template.this: Destroying... [id=0460a454-28b8-3232-5454-059acf5a0216]
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more
│ details.
╵
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more
│ details.
╵

Stack trace from the terraform-provider-equinix_v2.3.1 plugin:

fatal error: concurrent map writes

goroutine 138 [running]:
net/textproto.MIMEHeader.Set(...)
        net/textproto/header.go:22
net/http.Header.Set(...)
        net/http/header.go:40
github.com/go-resty/resty/v2.(*Client).SetHeader(...)
        github.com/go-resty/resty/v2@v2.3.0/client.go:165
github.com/equinix/terraform-provider-equinix/internal/config.(*Config).AddModuleToNEUserAgent(0x1400004ef68?, 0x1400004ef80, 0x1176592d3f5?)
        github.com/equinix/terraform-provider-equinix/internal/config/config.go:297 +0xdc
github.com/equinix/terraform-provider-equinix/equinix.resourceNetworkACLTemplateDelete({0x103d88a38?, 0x14000539080?}, 0x140008c4e00, {0x103ceef80?, 0x140006a35c0?})
        github.com/equinix/terraform-provider-equinix/equinix/resource_network_acl_template.go:288 +0x54
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).delete(0x14000430620, {0x103d88a38, 0x14000539080}, 0x140008c4e00, {0x103ceef80, 0x140006a35c0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:857 +0xe4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x14000430620, {0x103d88a38, 0x14000539080}, 0x1400069b790, 0x140008c4d80, {0x103ceef80, 0x140006a35c0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:906 +0x488
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14000129b18, {0x103d88a38?, 0x14000538fc0?}, 0x14000614a00)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xaa4
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x1400044e000, {0x103d88a38?, 0x14000538cf0?}, 0x14000614a00)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*ser

Expected Behavior

-

Actual Behavior

-

Steps to Reproduce

-

ctreatma commented 3 months ago

Related to #286 and #403