hashicorp / terraform-provider-infoblox

This provider has moved to https://github.com/infobloxopen/terraform-provider-infoblox
https://github.com/infobloxopen/terraform-provider-infoblox
Mozilla Public License 2.0
12 stars 22 forks source link

Error on Apply: "AdmConProtoError: Field is not searchable: configure_for_dns" #5

Closed ephos closed 4 years ago

ephos commented 4 years ago

Trying out the provider now that it's been moved into the Hashicorp repo. It seems that no matter what I do, the allocation seems to throw the following error when running terraform apply.

Error: Error allocating IP from network block(10.0.0.0/24): WAPI request error: 400('400 Bad Request')
Contents:
{ "Error": "AdmConProtoError: Field is not searchable: configure_for_dns",
  "code": "Client.Ibap.Proto",
  "text": "Field is not searchable: configure_for_dns"
}

The block for this is below, I have tried with and without enable_dns set to true as well.

resource "infoblox_ip_allocation" "ip_allocation" {
  network_view_name   = "default"
  vm_name             = "servername"
  cidr                = "10.0.0.0/24"
  tenant_id           = "MyOrg"
  dns_view            = "default"
  zone                = "domain.com"
}

The terraform plan works fine and shows all of the sources that will be created including my Infoblox items, but the apply is what keeps throwing a 400 error.

Have I run into a bug, a configuration issue with our Grid Server, or is it something wrong with my declaration?

AvRajath commented 4 years ago

Does not look like an issue with the .tf file nor a bug in terraform? Just to confirm that, have you tried running a cURL(WAPI) command to create a record in the same network range and similar parameters? Can u paste that cURL response here?

ephos commented 4 years ago

I will try to get a cURL statement put together against the WAPI. I can confirm the WAPI has been working for quite some time with other languages. I am able to get next available IP, complete CRUD actions for DNS records, etc. against the WAPI using PowerShell and Invoke-RestMethod.

FixFlare commented 4 years ago

I had the exact same error and it was either caused by accidentally switching infoblox server and my ip address record OR using "https://servername.fqdn" in the INFOBLOX_SERVER variable.

Try using IP address of your infoblox server instead, that seems to work for me.

bandit145 commented 4 years ago

@ephos I just hit this and my issue is I forgot to add the required EAs listed in the readme to our Infoblox. If you did not add them that could be the issue.

ephos commented 4 years ago

@bandit145 This was my issue. Our IB admins said they had added them, I should have double checked. I am going to mark this issue as closed! Sorry!