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] unexpected status code got: 400 expected: 200 when using data "netbox_prefix" #9

Open
byrdog55 opened this issue Feb 3, 2021 · 0 comments

Comments

@byrdog55
Copy link

byrdog55 commented Feb 3, 2021

When using Terraform 0.13 and Netbox version v2.10.3 and using a data "netbox_prefix" resource for an existing prefix terraform plan returns Error: [ERROR] unexpected status code got: 400 expected: 200

I can curl the URL in the error with the same API token provided to the provider and I get the response I expect.
curl --location --request GET 'https://cloud-engineering-netbox.mydomain.com/api/ipam/prefixes/?prefix=10.89.0.0%2F16'
--header 'Authorization: token XXXXXXXXXXXXXXXXXXXXXXX'

Expected result:
terraform plan populates the data "netbox_prefix" resource

Attached: Trace output from the terraform plan.
terraform-provider-netbox-trace.txt

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