You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the latest version of terraform (if not please provide a version number).
I have used the latest version of this terraform provider (if not please provide a version number).
I have provided a sample .tf configuration under "Additional context".
I have answered the following question: Is this issue reproducible in OT&E or only applies to live?
Describe the bug
When trying to setup a "SLAVE" type nameserver, the plugin crashes. This crash is reproducible on both live and OT&E.
The nameserver entry at INWX is actually being created, though.
The Log shows the following stack trace:
inwx_nameserver.primary: Creating...
╷
│ Error: Plugin did not respond
│
│ with inwx_nameserver.primary,
│ on main.tf line 80, in resource "inwx_nameserver" "primary":
│ 80: resource "inwx_nameserver" "primary" {
│
│ 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-inwx_v1.4.2 plugin:
panic: interface conversion: interface {} is nil, not []interface {}
goroutine 98 [running]:
github.com/inwx/terraform-provider-inwx/inwx/internal/resource.resourceNameserverRecordRead({0xd14088, 0xc0001d6a10}, 0xc000507700, {0xb63320?, 0xc0004a6870})
github.com/inwx/terraform-provider-inwx/inwx/internal/resource/resource_nameserver_record.go:263 +0xd74
github.com/inwx/terraform-provider-inwx/inwx/internal/resource.resourceNameserverCreate({0xd14088, 0xc0001d6a10}, 0xb1a5e0?, {0xb63320?, 0xc0004a6870?})
github.com/inwx/terraform-provider-inwx/inwx/internal/resource/resource_nameserver.go:246 +0xb6b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000166c40, {0xd13fe0, 0xc00052f470}, 0xd?, {0xb63320, 0xc0004a6870})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:708 +0x11b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000166c40, {0xd13fe0, 0xc00052f470}, 0xc000552680, 0xc000507580, {0xb63320, 0xc0004a6870})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:838 +0x95a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000365aa0, {0xd14018?, 0xc0004a6b40?}, 0xc0004a6be0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/grpc_provider.go:1021 +0xdbc
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0002306e0, {0xd13fe0?, 0xc00052ec30?}, 0xc0001d6150)
github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/tf5server/server.go:812 +0x50b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xbc9720?, 0xc0002306e0}, {0xd13fe0, 0xc00052ec30}, 0xc00060c4e0, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002b48c0, {0xd17d10, 0xc0003871e0}, 0xc0005326c0, 0xc0002e9ef0, 0x11d6760, 0x0)
google.golang.org/grpc@v1.45.0/server.go:1282 +0xcd5
google.golang.org/grpc.(*Server).handleStream(0xc0002b48c0, {0xd17d10, 0xc0003871e0}, 0xc0005326c0, 0x0)
google.golang.org/grpc@v1.45.0/server.go:1619 +0x9e7
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.45.0/server.go:921 +0x8d
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 26
google.golang.org/grpc@v1.45.0/server.go:919 +0x246
Error: The terraform-provider-inwx_v1.4.2 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
To Reproduce
Run the example Terraform configuration provided.
Expected behavior
The DNS zone should be correctly created as a secondary on the INWX nameservers, with the provided configuration on the Terraform resource. The plugin should not crash.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context
Sample .tf configuration:
terraform {
required_providers {
inwx={
source ="inwx/inwx"
version =">= 1.0.0"
}
}
}
provider"inwx" {
api_url=var.api_urltan=var.tanusername=var.username
}
resource"inwx_nameserver""primary" {
domain="test.example"type="SLAVE"nameservers=["ns.inwx.de"]
master_ip="192.0.2.1"# RFC5737 example IP
}
The text was updated successfully, but these errors were encountered:
As this is a secondary zone which first needs to be filled with Information via AXFR, those records are most likely not available at the point where the code expects to be able to read back the NS records.
It would be good if the possible solution for this issue does not try to read the NS records for zones of type "SLAVE". If it would wait for those records to be available after an AXFR, you can run into issues where the actual creation of the primary zone and subsequent AXFR/NOTIFY needs to happen before the creation of the INWX resource. This introduces some inflexibility in usage. It's not a huge deal and can be worked around probably, but I think for some setups this might allow for a less complex resource ordering.
Checklist
Describe the bug
When trying to setup a "SLAVE" type nameserver, the plugin crashes. This crash is reproducible on both live and OT&E.
The nameserver entry at INWX is actually being created, though.
The Log shows the following stack trace:
To Reproduce
Run the example Terraform configuration provided.
Expected behavior
The DNS zone should be correctly created as a secondary on the INWX nameservers, with the provided configuration on the Terraform resource. The plugin should not crash.
Screenshots
If applicable, add screenshots to help explain your problem.Additional context
Sample .tf configuration:
The text was updated successfully, but these errors were encountered: