Coder Social home page Coder Social logo

terraform-provider-infoblox's Introduction

Terraform Infoblox Provider

Build status

The Infoblox provider is used to interact with the resources supported by Infoblox. The provider needs to be configured with the proper credentials before it can be used.

Download

Download builds for Darwin, Linux and Windows from the releases page.

Example Usage

# Configure the Infoblox provider
provider "infoblox" {
    username = "${var.infoblox_username}"
    password = "${var.infoblox_password}"
    host  = "${var.infoblox_host}"
    sslverify = "${var.infoblox_sslverify}"
    usecookies = "${var.infoblox_usecookies}"
}

# Create a record
resource "infoblox_record_a" "www" {
    ...
}

Argument Reference

The following arguments are supported:

  • username - (Required) The Infoblox username. It must be provided, but it can also be sourced from the INFOBLOX_USERNAME environment variable.
  • password - (Required) The password associated with the username. It must be provided, but it can also be sourced from the INFOBLOX_PASSWORD environment variable.
  • host - (Required) The base url for the Infoblox REST API, but it can also be sourced from the INFOBLOX_HOST environment variable.
  • sslverify - (Required) Enable ssl for the REST api, but it can also be sourced from the INFOBLOX_SSLVERIFY environment variable.
  • usecookies - (Optional) Use cookies to connect to the REST API, but it can also be sourced from the INFOBLOX_USECOOKIES environment variable

infoblox_record_host

Provides an Infoblox Host record resource.

Example Usage

resource "infoblox_record_host" "host" {
  name              = "terraformhost.platform.test-aib.pri"
  configure_for_dns = false

  ipv4addr {
    address = "10.89.130.30"
  }

  ipv4addr {
    address            = "10.89.130.31"
    configure_for_dhcp = true
    mac                = "01-23-45-67-89-10"
  }
}

Argument Reference

  • name - (Required) The name of the record
  • ipv4addr - (Required) An IPv4 address object. At least one iv4addr or ipv6addr must be specified. See ipv4addr options below.
  • ipv6addr - (Required) An IPv6 address object. At least one iv4addr or ipv6addr must be specified. See ipv6addr options below.
  • configure_for_dns - (Boolean, Optional) Specify whether DNS should be configured for the record; defaults to false
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

Ipv4 options

  • address - (Required) The IPv4 address of the object
  • configure_for_dhcp - (Boolean, Optional) Specifies whether the IPv4 address object should be configured for DHCP
  • mac - (Optional) The MAC address of the resource

Ipv6 options

  • address - (Required) The IPv6 address of the object
  • configure_for_dhcp - (Boolean, Optional) Specifies whether the IPv4 address object should be configured for DHCP
  • mac - (Optional) The MAC address of the resource

infoblox_record_a

Provides an Infoblox A record resource.

Example Usage

resource "infoblox_record_a" "web" {
  address = "10.1.2.3"
  name    = "some.fqdn.lan"

  comment = "ipv4 address for Acme web server"
  ttl     = 3600
  view    = "default"
}

Argument Reference

The following arguments are supported:

  • address - (Required) The IPv4 address of the record
  • name - (Required) The FQDN of the record
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_record_aaaa

Provides an Infoblox AAAA record resource.

Example Usage

resource "infoblox_record_aaaa" "web" {
  address = "2001:db8:85a3::8a2e:370:7334"
  name    = "some.fqdn.lan"

  comment = "ipv6 address for Acme web server"
  ttl     = 3600
  view    = "default"
}

Argument Reference

The following arguments are supported:

  • address - (Required) The IPv6 address of the record
  • name - (Required) The FQDN of the record
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_record_cname

Provides an Infoblox CNAME record resource.

Example Usage

resource "infoblox_record_cname" "www" {
  canonical = "fqdn.lan"
  name      = "www.fqdn.lan"

  comment = "ipv6 address for Acme web server"
  ttl     = 3600
  view    = "www.fqdn.lan is an alias for fqdn.lan"
}

Argument Reference

The following arguments are supported:

  • canonical - (Required) The canonical address to point to
  • name - (Required) The FQDN of the alias
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_record_ptr

Provides an Infoblox PTR record resource.

Example Usage

resource "infoblox_record_ptr" "ptr" {
  ptrdname = "some.fqdn.lan"
  address  = "10.0.0.10.in-addr.arpa"

  comment = "Reverse lookup for some.fqdn.lan"
  ttl     = 3600
  view    = "default"
}

Argument Reference

The following arguments are supported:

  • ptrdname - (Required) The
  • address - (Required, conflicts with name) This field is required if you do not use the name field. Either the IP address or name is required. Example: 10.0.0.11. If the PTR record belongs to a forward-mapping zone, this field is empty. Accepts both IPv4 and IPv6 addresses.
  • name - (Required, conflicts with address) This field is required if you do not use the address field. Either the IP address or name is required. Example: 10.0.0.10.in.addr.arpa
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_record_txt

Provides an Infoblox TXT record resource.

Example Usage

resource "infoblox_record_txt" "txt" {
  name = "some.fqdn.lan"
  text = "Welcome to the Jungle"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the TXT record
  • text - (Required) The text of the TXT record
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_record_srv

Provides an Infoblox SRV record resource.

Example Usage

resource "infoblox_record_srv" "srv" {
  name = "bind_srv.domain.com"
  port = 1234
  priority = 1
  weight = 1
  target = "old.target.test.org"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the record
  • port - (Integer, Required) The port of the SRV record
  • priority - (Integer, Required) The priority of the SRV record
  • weight - (Integer, Required) The weight of the SRV record
  • target - (Required) The target of the SRV record
  • comment - (Optional) The comment for the record
  • ttl - (Integer, Optional) The TTL of the record
  • view - (Optional) The view of the record

infoblox_ip

Queries the next available IP address from a network and returns it in a computed variable that can be used by the infoblox_record resource.

Example Usage

# Acquire the next available IP from a network CIDR
# it will create a variable called "ipaddress"
resource "infoblox_ip" "ip" {
  cidr = "10.0.0.0/24"
}

resource "infoblox_record_a" "web" {
  address = "${infoblox_ip.ip.ipaddress}"
  name    = "some.fqdn.lan"

  comment = "ipv4 address for Acme web server"
  ttl     = 3600
  view    = "default"
}

# Exclude specific IP addresses when acquiring next
# avaiable IP from a network CIDR
resource "infoblox_ip" "excludedIPAddress" {
  cidr = "10.0.0.0/24"

  exclude = [
    "10.0.0.1",
    "10.0.0.2"
    # etc.
  ]
}

# Acquire free IP address from within a specific
# range of addresses
resource "infoblox_ip" "ipAddressFromRange" {
  ip_range = "10.0.0.20-10.0.0.60"
}

Argument Reference

The following arguments are supported:

  • cidr - (Required) The network to search for - example 10.0.0.0/24. Cannot be specified with ip_range
  • exclude - (Optional) A list of IP addresses to exclude
  • ip_range - (Required) The IP range to search within - example 10.0.0.20-10.0.0.40. Cannot be specified with cidr

Deprecated Resources

The following resources are deprecated and will no longer see active development. It is recommended you use the dedicated infoblox_record_* resources instead.

infoblox_record

Provides a Infoblox record resource.

Example Usage

# Add a record to the domain
resource "infoblox_record" "foobar" {
  value = "192.168.0.10"
  name = "terraform"
  domain = "mydomain.com"
  type = "A"
  ttl = 3600
}

Argument Reference

See related part of Infoblox Docs for details about valid values.

The following arguments are supported:

  • domain - (Required) The domain to add the record to
  • value - (Required) The value of the record; its usage will depend on the type (see below)
  • name - (Required) The name of the record
  • ttl - (Integer, Optional) The TTL of the record
  • type - (Required) The type of the record
  • comment - (Optional) The comment of the record

DNS Record Types

The type of record being created affects the interpretation of the value argument.

A Record

  • value is the IPv4 address

CNAME Record

  • value is the alias name

AAAA Record

  • value is the IPv6 address

Attributes Reference

The following attributes are exported:

  • domain - The domain of the record
  • value - The value of the record
  • name - The name of the record
  • type - The type of the record
  • ttl - The TTL of the record

terraform-provider-infoblox's People

Contributors

dn1s avatar fmosti-aib avatar golint-fixer avatar jackbracken avatar jrandall avatar mifrost avatar prudhvitella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-infoblox's Issues

Broken on V10

Broken on Terraform V10
Terraform v0.10.0
Incompatible API version with plugin. Plugin version: 2, Ours: 4

Document the installation procedure

Hi,

Would it be possible to document the installation procedure?

I tried to put the released binary in ~/.terraform.d/plugins/linux_amd64/linux_amd64_terraform-provider-infoblox, but terraform complains it cannot fing it as a provider:

$ terraform init

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...

Provider "infoblox" not available for installation.

A provider named "infoblox" could not be found in the official repository.

This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.

In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
    terraform.d/plugins/linux_amd64

Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".

Any idea how to install the plugin properly?

Add support for host and ptr records, as well as obtain next available IP from CIDR.

Hi,

just wanted to say that your infoblox provider worked great. I was able to get it running in a short amount of time, great ReadMe. I just moved into a coding role and have a need to extend the functionality to include Host and Ptr records as well as the ability to query infoblox for the next available IP based on the network CIDR block give in another provider. Would it be possible to work together to accomplish this?

Thanks,

Karlos

Adding Host record not idempotent configure_for_dns always saved in state file as `false`

terraform plan

  # infoblox_record_host.host will be created
  + resource "infoblox_record_host" "host" {
      + configure_for_dns = true
      + id                = (known after apply)
      + name              = "REDACTED"
      + view              = "default"

      + ipv4addr {
          + address = (known after apply)
        }
    }

terraform apply

  # infoblox_record_host.host will be created
  + resource "infoblox_record_host" "host" {
      + configure_for_dns = true
      + id                = (known after apply)
      + name              = "REDACTED"
      + view              = "default"

      + ipv4addr {
          + address = (known after apply)
        }
    }

terraform plan

  # infoblox_record_host.host will be updated in-place
  ~ resource "infoblox_record_host" "host" {
        comment           = ""
      ~ configure_for_dns = false -> true
        id                = "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5zdHRndHMuY2xvdWQubWxjMS5wMDEuc2Ft:REDACTED/default"
        name              = "REDACTED"
        ttl               = 0
        view              = "default"

      ~ ipv4addr {
            address            = "10.97.8.1"
            configure_for_dhcp = false
            mac                = ""
        }
    }

debugging this using Postman, it appears for some reason that configure_for_dns is not returned when getting Host Record by reference

GET https://grid:443/wapi/v2.9/record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5zdHRndHMuY2xvdWQubWxjMS5wMDEuc2Ft:REDACTED/default
{
    "_ref": "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5zdHRndHMuY2xvdWQubWxjMS5wMDEuc2Ft:REDACTED/default",
    "ipv4addrs": [
        {
            "_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLnN0dGd0cy5jbG91ZC5tbGMxLnAwMS5zYW0uMTAuOTcuOC4xLg:10.97.8.1/REDACTED/default",
            "configure_for_dhcp": false,
            "host": "REDACTED",
            "ipv4addr": "10.97.8.1"
        }
    ],
    "name": "REDACTED",
    "view": "default"
}

A simple fix could be to fix this line

// RecordHostObject defines the HOST record object's fields
type RecordHostObject struct {
...
	ConfigureForDNS bool           `json:"configure_for_dns"`
...
}

to

	ConfigureForDNS bool           `json:"configure_for_dns,omitempty"`

TTL and comments do not get set on A records

When I setup a new A record, the provider wants to set the comment and TTL again on the next apply. A second apply does not set the values.

My workaround for now is to not set TTL or comment. The comment is off less concern.

Getting empty response from client.Network

I am providing a cidr of "10.193.3.0/24" to the infoblox_ip resource and am getting the following:

  • infoblox_ip.ip: [ERROR] Empty response from client.Network().find. Is 10.193.3.0/24 a valid network?

I see in the code that you print this error after this:
if len(network) == 0

I am not positive what is going into the 'network' variable, but if it is my cidr I am very confused.

Can you help me?

PTR Resource Idempotent

Hi,
Great work on this provider! I hit an issue with the PTR resource though. It doesn't seem to be idempotent. Every-time I run terraform plan/apply it wants to make a change. It seems like it may be similar to this issue #37

Terraform v0.11.10
This terraform-provider-infoblox: https://github.com/prudhvitella/terraform-provider-infoblox/releases/download/pre-release/linux_amd64_terraform-provider-infoblox

For example, this code:

resource "infoblox_record_ptr" "ptr" {  
  ptrdname = "vm02.domain.local"  
  name     = "175.0.0.10.in-addr.arpa" 
  view     = "default"
 
}

will result in this change everytime:

~ infoblox_record_ptr.ptr
      name: "" => "175.0.0.10.in-addr.arpa"

Also, if I change from name to address value in the resource definition I get the following behavior.

resource "infoblox_record_ptr" "ptr" {
  ptrdname = "vm02.domain.local"
  address     = "10.0.0.175"
  view     = "default"
}

This results in:

-/+ infoblox_record_ptr.ptr (new resource required)
      id:       "record:ptr/ZG5zLmJpbmRfcHRyJC5fZGVmYXVsdC5hcnBhLmluLWFkZHIuMTAuMTE2LjQuNDQuYTF2aXRzYmxkcjAyLnEyZGMubG9jYWw:175.0.0.10.in-addr.arpa/default" => <computed> (forces new resource)
      address:  "" => "10.0.0.175" (forces new resource)
      ptrdname: "vm02.domain.local" => "vm02.domain.local"
      view:     "default" => "default"

Adding a 'Host' record not an idempotent operation

Hello,

I'm using:

  • terraform-provider-infoblox pre-release
  • Terraform v0.10.8
  • Infoblox 8.2.1-359366

The issue I'm observing:

After a new Host record has just been created via a Terraform template, if I were to run terraform plan a second time a new set of changes is proposed.

Even after this extra change set has been applied, a subsequent terraform plan produces the same changes yet again:

$ terraform plan
...
...
Terraform will perform the following actions:

  ~ module.testmodule.infoblox_record_host.myhost
      ipv4addr.#:                    "2" => "1"
      ipv4addr.0.address:            "" => "10.10.10.10"
      ipv4addr.0.configure_for_dhcp: "" => "false"
      ipv4addr.0.mac:                "" => "fa:16:3e:44:69:2b"
      ipv4addr.1.address:            "10.10.10.10" => ""
      ipv4addr.1.configure_for_dhcp: "true" => "false"
      ipv4addr.1.host:               "myhost.example.com" => ""
      ipv4addr.1.mac:                "fa:16:3e:44:69:2b" => ""
      ipv6addr.#:                    "1" => "0"


Plan: 0 to add, 1 to change, 0 to destroy.


$ terraform apply
...
...
  ipv4addr.#:                    "2" => "1"
  ipv4addr.0.address:            "" => "10.10.10.10"
  ipv4addr.0.configure_for_dhcp: "" => "false"
  ipv4addr.0.mac:                "" => "fa:16:3e:44:69:2b"
  ipv4addr.1.address:            "10.10.10.10" => ""
  ipv4addr.1.configure_for_dhcp: "true" => "false"
  ipv4addr.1.host:               "myhost.example.com" => ""
  ipv4addr.1.mac:                "fa:16:3e:44:69:2b" => ""
  ipv6addr.#:                    "1" => "0"


$ terraform plan
...
...
Terraform will perform the following actions:

  ~ module.testmodule.infoblox_record_host.myhost
      ipv4addr.#:                    "2" => "1"
      ipv4addr.0.address:            "" => "10.10.10.10"
      ipv4addr.0.configure_for_dhcp: "" => "false"
      ipv4addr.0.mac:                "" => "fa:16:3e:44:69:2b"
      ipv4addr.1.address:            "10.10.10.10" => ""
      ipv4addr.1.configure_for_dhcp: "true" => "false"
      ipv4addr.1.host:               "myhost.example.com" => ""
      ipv4addr.1.mac:                "fa:16:3e:44:69:2b" => ""
      ipv6addr.#:                    "1" => "0"


Plan: 0 to add, 1 to change, 0 to destroy.

The template:

resource "infoblox_record_host" "myhost" {
  name = "${var.fqdn}"
  view = "${var.dnsview}"

  ipv4addr {
    address = "${var.ipv4}"
    mac = "${var.mac}"
    configure_for_dhcp = false
  }
}

NB: The number of IP addresses associated with the record is 1, whereas the plugin seems to detect 2 in ipv4addr.#.

Expected behavior

I expect adding a new host record to be an idempotent operation given that no further changes are made to the given template and/or the infoblox record itself.

Pre-released binaries are not statically compiled

Pre-released binaries are not statically compiled:

bash-4.4$ ldd terraform-provider-infoblox
 /lib64/ld-linux-x86-64.so.2 (0x7f2322dbf000)
 libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f2322dbf000)
 libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f2322dbf000)

If for the next release, you could adopt a dockerfile to build them statically, like I did for another terraform plugin:

https://github.com/zoobab/terraform-provider-ldap/commits/Dockerfile

I will make a PR with those tools...

infoblox_record_host Doesn't Store Comment in the Statefile

When using the infoblox_record_host resource with a comment, the plan will always show the comment is being set from empty strings to whatever your comment is:

I changed some values:

  ~ infoblox_record_host.foo
      comment:        "" => "Some foo comment"

  ~ infoblox_record_host.bar
      comment:        "" => "Some bar comment"

When looking in the statefile, it's clear that the comment is not saved, even though it's saved in the actual infoblox record:

$ terragrunt state show infoblox_record_host.foo

id                            = record:host/ZG5zLmhvc3QkLjEuY29tLmVub3ZhLmZvby1tcGVzY2V0dG8tdGVzdC1mNTAx:foo-mpescetto-test-f501.enova.com/inside
comment                       =
configure_for_dns             = false
ipv4addr.#                    = 4
ipv4addr.0.address            = 10.1.1.22
ipv4addr.0.configure_for_dhcp = false
ipv4addr.0.mac                =
ipv4addr.1.address            = 10.1.2.22
ipv4addr.1.configure_for_dhcp = false
ipv4addr.1.mac                =
ipv4addr.2.address            = 10.1.2.23
ipv4addr.2.configure_for_dhcp = false
ipv4addr.2.mac                =
ipv4addr.3.address            = 10.7.1.23
ipv4addr.3.configure_for_dhcp = false
ipv4addr.3.mac                =
ipv6addr.#                    = 0
name                          = foo.test.com
ttl                           = 0
view                          = inside

terraform-provider-infoblox errors when records are deleted on infoblox out of band

I got the following error recently, after some A records were deleted from infoblox, but still existed in terraform state file:

Error refreshing state: 1 error(s) occurred:

* module.spark-master.infoblox_record.spark-master-dns: 1 error(s) occurred:

* module.spark-master.infoblox_record.spark-master-dns: infoblox_record.spark-master-dns: Couldn't find Infoblox A record: Error AdmConDataNotFoundError: Reference record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQudWsuYWMuc2FuZ2VyLmhnaSxzcGFyay0wMS1tYXN0ZXIsMTcyLjI3LjkxLjI1MQ:spark-01-master.hgi.sanger.ac.uk/internal not found - Client.Ibap.Data.NotFound - Reference record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQudWsuYWMuc2FuZ2VyLmhnaSxzcGFyay0wMS1tYXN0ZXIsMTcyLjI3LjkxLjI1MQ:spark-01-master.hgi.sanger.ac.uk/internal not found

The problem here is that the terraform plugin Read method returns an error when the resource does not exist (in this case from the line:

return fmt.Errorf("Couldn't find Infoblox A record: %s", err)
).

This is not what the Read method is supposed to do according to the docs, which state: "If the ID is updated to blank, this tells Terraform the resource no longer exists (maybe it was destroyed out of band). Just like the destroy callback, the Read function should gracefully handle this case." (from https://www.terraform.io/guides/writing-custom-terraform-providers.html#implementing-read).

These error handlers should identify the condition when the error actually means "record not found" and in that case call d.SetId("") and return nil rather than returning an error.

query multiple IPs in loop count

Hi,

is there a way to support count loop returning more than one next available IP ?
I am aware that Infoblox API supports it (&num=X) https://community.infoblox.com/t5/API-Integration/Get-Next-Available-IP-and-Reserve/td-p/8548

my problem, I want to ask for the next X available IPs and create an A record for all of them.
On the example below in my case count = 4, but what happens is that I get 4x the same IP, instead of unique 4 next available IPs.

resource "infoblox_ip" "tunnel_ips" {
count = "4"
cidr = "192.168.0.0/16"
}

resource "infoblox_record" "vpn_host_internal" {
count = "4"
value = "${element(infoblox_ip.tunnel_ips.*.ipaddress, count.index)}"
name = "test-{count.index +1}"
domain = "acme.com"
type = "A"
ttl = 3600
}

Error type assertion panic

Hi, we are getting occasional 'panic: interface conversion: error is *errors.errorString, not infoblox.Error' which come from the type assertion err.(infoblox.Error).Code() in the handleReadError function in resource_infoblox_record.go

It seems to be trying to assert that an ordinary go error (from fmt.Errorf in this case) is an infoblox.Error

It would be possible to check for this using the type assertion test (t, ok := i.(T)) which should stop the panic. But would that be just covering up a problem elsewhere?

thanks, Sarah

Unable to update A records

Hello, when I attempt to update an A record, I get the following response. I built the provider with the latest source. Thanks for any help.

* infoblox_record_a.dev-cf41-test2-kafka1: error updating Infoblox A record: Error AdmConProtoError: Field is not allowed for update: view - Client.Ibap.Proto - Field is not allowed for update: view

Issue Applying

Could you please assist with the below error ?

infoblox_ip.theIPAddress: Creating...
cidr: "" => "10.13.34.0/24"
ipaddress: "" => ""
Error applying plan:

1 error(s) occurred:

  • infoblox_ip.theIPAddress: 1 error(s) occurred:

  • infoblox_ip.theIPAddress: unexpected EOF

Tf then crashes

Can't add PTR or HOST records

I'd like to add reverse DNS addresses for my A records.

The provider does not allow PTR records, nor does it allow HOST records which appears to be an infoblox-specific thing that will create the A record AND the PTR for reverse lookups.

Incompatible API version with plugin.

Infoblox provider is working fine with Terraform 0.11.X versions. When I tried with terraform 0.12.X, I am facing Incompatible API version with plugin issue

Error: Failed to instantiate provider "infoblox" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

infoblox_ip never runs during subsequent plans using the same cidr

I am just using the infoblox_ip resource to pull the next available ip in a given block but am not using a reserve_a/host/aaaa resource to reserve it. (I am running a go script to reserve the ip using an Infoblox Fixed Address).
When I do a subsequent plan the reserve_ip block only refreshes it's state and does not grab a new one. Is there any way to force it to rerun even though the IP isn't reserved within Terraform

infoblox_ip error

Dear,
no way to get the next available IP from a network CIDR using
resource "infoblox_ip" "ip" { cidr = "172.16.8.0/24" }

I get this error:

infoblox_ip.ip: Creating...
  cidr:      "" => "172.16.8.0/24"
  ipaddress: "" => "<computed>"

Error: Error applying plan:

1 error(s) occurred:

* infoblox_ip.ip: 1 error(s) occurred:

* infoblox_ip.ip: [ERROR] Empty response from client.Network().find. Is 172.16.8.0/24 a valid network?

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

but the network exist:

 curl -k -u admin:passwd -X GET "https://infoblox/wapi/v2.9.1/network?_return_as_object=1"
{
    "result": [
        {
            "_ref": "network/ZG5zLm5ldHdvcmskMTcyLjE2LjguMC8yNC8w:172.16.8.0/24/default", 
            "network": "172.16.8.0/24", 
            "network_view": "default"
        }
    ]

Using:

resource "infoblox_ip" "ipAddressFromRange" {
  ip_range = "172.16.8.5-172.16.8.10"
}

crashed terraform! See attachment crash.log for details.
Thanks.

crash.log

panic: runtime error: index out of range

Hi there

Im trying to use your porvider to get the next free ip from a network but I keep getting the error:

[DEBUG] plugin.terraform-provider-infoblox: panic: runtime error: index out of range

In the crash.log I see the API URL the providers tries to access.
If i manually acces the url via curl I get a valid reponse with unsed ip's.

Any idea what might be wrong?

Cheers
yodarx

FindUnusedIPInRange does not respect exclusions

It looks like the underlying go Infoblox API does not support exclusions in the 'find by range' query so the exclusion list is not passed to the next available IP query.
https://github.com/prudhvitella/terraform-provider-infoblox/blob/master/infoblox/resource_infoblox_ip.go#L108

However there is no documentation that describes or states that the Exclusion list is ignored if you use the "ip_range" attribute. For example the value 10.0.10.10 will still be assigned using the following resource block.

resource "infoblox_ip" "test" {
   ip_range="10.0.10.10-10.0.10.14"
   exclude = ["10.0.10.10"] #Ignored
}`

terraform panic

I seem to be getting a panic when I try to create an A record.

InfoBlox Appliance version: 7.3.4

terraform --version
Terraform v0.6.16

terraform-provider-infoblox pre-release tag

Here are some lines of logs that show when it panics:

2016/07/11 10:49:46 [DEBUG] terraform-provider-infoblox: 2016/07/11 10:49:46 POST /wapi/v1.4.1/record:a  payload: <PAYLOAD_REMOVED>
2016/07/11 10:49:46 [DEBUG] terraform-provider-infoblox: panic: runtime error: invalid memory address or nil pointer dereference
2016/07/11 10:49:46 [DEBUG] terraform-provider-infoblox: [signal 0xb code=0x1 addr=0x10 pc=0x532c12]

invalid remote plugin...

Using both terraform 0.8.4 and 0.8.6 gives me:

Error configuring: 1 error(s) occurred:

  • Unrecognized remote plugin message: 2|unix|/var/folders/9k/gqp_92xx5ml9__33gkmw7wrj69yys9/T/tf-plugin282817430

This usually means that the plugin is either invalid or simply
needs to be recompiled to support the latest protocol.`

Support view attribute for CNAME records

Currently, the view attribute seems only be supported for the A records (reading through the code; the readme is silent on that).

Please add the support of this attribute to the CNAME records as well.

Infoblox version not supported

When I try to create a record in Infoblox using terraform, it shows error : Invalid reference: record:a/wapi/v1.4.1/record:a
The version of Infoblox wapi that we use is v2.1. But the version supported is wapi/v1.4.1.
When I tried to access the link https://10.26.77.230/wapi/v2.1/record:a via browser, it worked. The result came in the form of XML.
Is it possible to convert version from 2.1 to 1.4.1?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.