Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 13 Next »

The infoblox_ip_association resource enables you to manage DHCP related properties of the host record object that was created using the infoblox_ip_allocation resource. You can update the host record created using the allocation resource with details of the VM created in the cloud environment. The VM details include a MAC address in case of an IPv4 address and a DUID in case of an IPv6 address.

The following table describes the parameters you can define in the infoblox_ip_association resource block:

Parameter

Required/Optional

Description

Example Value

internal_id

Required

Specifies the value of the Terraform Internal ID extensible attribute listed as a a prerequisite for the plug-in. It is generated for the host record when creating the infoblox_ip_allocation resource and is located in the id field of the appropriate infoblox_ip_allocation resource.
Note:

  • The reference to the internal_id field of infoblox_ip_allocation will continue to work until the next release.

  • The id and internal_id fields of the infoblox_ip_allocation resource use the same values.

infoblox_ip_allocation.foo.id

enable_dhcp

Optional

Specifies whether the host record must be created in the DHCP server side.
The default value is false.

true

mac_addr

Required only if the host record has an IPv4 address

Applies only to IPv4 addresses.
It specifies the MAC address to associate the IP address with. It is the MAC address of the network interface of the cloud instance that corresponds to the host record created using the infoblox_ip_allocation resource.
The default value is an empty string, which is internally transformed to 00:00:00:00:00:00

Note: When you keep the default value, the enable_dhcp flag in NIOS for the referenced IPv4 address, is automatically set to false even though the field is set to true in the terraform.tfstate file.

02:42:97:87:70:f9

duid

Required only if the host record has an IPv6 address

Applies only for IPv6 addresses.
It specifies the DHCPv6 Unique Identifier (DUID) of the address object.
The default is an empty string.

Note: If the host record contains of an IPv6 address, you must enter a value in this field. Otherwise, NIOS returns an error when the association resource is created.

34:df:37:1a:d9:7f (The DUID could be the same type of value as the MAC address of a network interface).

Note

Currently, for a host record with both IPv4 and IPv6 addresses, you can disable or enable DHCP for both the address types at the same time using the Terraform plug-in.

  • If you want to disable DHCP for any one of the addresses when the flag is enabled (enable_dhcp = "true"), in the infoblox_ip_association resource block, comment out mac_addr to disable only the IPv4 address, or comment out duid to disable only the IPv6 address.

  • If you want to enable DHCP for any one of the addresses when the flag is disabled (enable_dhcp = "false"), in the infoblox_ip_association resource block, set enable_dhcp = "true", then comment out mac_addr to keep only the IPv6 address, or comment out the duid to keep only the IPv4 address.

This causes the MAC address or DUID to be disassociated from the host record at the NIOS side.

Example of the Resource Block

The following examples of infoblox_ip_association, reference the examples of infoblox_ip_allociation in the infoblox_ip_allocation topic. You can link the examples by referring to the allocation resource name used in the internal_id parameter.

resource "infoblox_ip_association" "association1" {
internal_id = infoblox_ip_allocation.allocation1.id // which of the
// existing host records to deal with

# enable_dhcp = false // this is the default
mac_addr = "12:00:43:fe:9a:8c" // the address will be assigned but
// the DHCP configuration will not contain it
}

resource "infoblox_ip_association" "association2" {
internal_id = infoblox_ip_allocation.allocation4.id // choose an
//allocation resource for which enable_dns = false

# enable_dhcp = false // this is the default
duid = "00:43:d2:0a:11:e6" // the address will be assigned but
//the DHCP configuration will not contain it
}

resource "infoblox_ip_association" "association3" {
internal_id = infoblox_ip_allocation.allocation5.id

enable_dhcp = true // all systems go

mac_addr = "12:43:fd:ba:9c:c9"
duid = "00:43:d2:0a:11:e6"
}

resource "infoblox_ip_association" "association4" {
internal_id = infoblox_ip_allocation.allocation3.id

enable_dhcp = true // all systems go

// DHCP will be enabled for IPv4 ...
mac_addr = "09:01:03:d3:db:2a"

// ... and disabled for IPv6
# duid = "10:2a:9f:dd:3e:0a"
// yes, the DUID will be dissociated. but, you can
// uncomment it if you decide to enable DHCP for IPv6
}


  • No labels