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

Error creating RIR - not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface #606

Open
alexandrud opened this issue Jun 10, 2024 · 2 comments

Comments

@alexandrud
Copy link

I know the provider has not been tested with 4.0.2, but I'm adding this here maybe it can help when working on a version for 4.x.

Creating RIRs fails on a netbox 4.0.2 (netbox community docker image) deployed in kubernetes. The instance is configured on the subpath "/netbox".

The same version without the subpath, tested on a local machine, had no issue creating the RIRs so this is very odd. Seems very similar to #263.

Other resources are created without issues.

Terraform Version

opentofu 1.7.2

Affected Resource(s)

Please list the resources as a list, for example:

  • netbox_rir

Terraform Configuration Files

terraform {
  backend "http" {
    address = "https://<gitlab.example.com>/api/v4/projects/447/terraform/state/global-02-netbox"
    lock_address = "https://<gitlab.example.com>/api/v4/projects/447/terraform/state/global-02-netbox/lock"
    unlock_address = "https://<gitlab.example.com>/api/v4/projects/447/terraform/state/global-02-netbox/lock"
    username = "<user>"
    password = "<glpat-token>"
    retry_wait_min = "5"
    lock_method = "POST"
    unlock_method = "DELETE"
  }
}

terraform {
  required_providers {
    vsphere = {
      source = "hashicorp/vsphere"
      version = "~> 2.7"
    }
    vault = {
      source = "hashicorp/vault"
      version = "~> 4.2"
    }
    gitlab = {
      source = "gitlabhq/gitlab"
      version = "~> 17.0"
    }
    netbox = {
      source = "e-breuninger/netbox"
      version = "~> 3.8"
    }
  }
}
provider "netbox" {
  server_url = "https://<webgate.example.com>/netbox"
  api_token = data.vault_kv_secret_v2.netbox.data.token
}

Debug Output

[ERROR] provider.terraform-provider-netbox_v3.8.6: Response contains error diagnostic: diagnostic_severity=ERROR diagnostic_summary="0xc000402200 (*interface {}) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface" tf_rpc=ApplyResourceChange tf_resource_type=netbox_rir @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 tf_proto_version=5.4 @module=sdk.proto diagnostic_detail="" tf_provider_addr=registry.terraform.io/e-breuninger/netbox tf_req_id=214def9a-2b0e-0977-91e2-a548824ab090 timestamp=2024-06-10T08:56:07.126-0400

Panic Output

Expected Behavior

Create the RIR

Actual Behavior

Exits with error.

Steps to Reproduce

Deploy a netbox 4.0.2.

Add a resource of type netbox_rir and try to apply it.

Important Factoids

References

[Are there any other GitHub issues (open or closed) or Pull Requests that should
be linked here? For example:

@alexandrud
Copy link
Author

Upon further investigation this seem to have nothing to do with the provider, rather it has something to do with the deployed instance in kubernetes. Running with -parallelism=1 doesn't completely fix the issue, but it does behave better.

@alexandrud
Copy link
Author

alexandrud commented Jul 24, 2024

Even with --parallelism=1 this is still happening for "netbox_rir" resources. What's even more odd is that it actually creates the resources and then fails. Upon a subsequent run the rir resources appear as tainted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant