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

Version 1 Next »

You can allocate an IP address from a network and for a virtual machine in the NIOS appliance. To create an IP address for a network, NIOS sends a request from the network block to the next IP address available.

The infoblox_ip_association and infoblox_ip_allocation resources block together form the IP address allocation. The infoblox_ip_association resource block is also used to update the virtual machine properties such as mac_addr and vm_id.

Using the infoblox_ip_allocation resource block, an IP address is reserved in NIOS appliance. For example, if the ip_addr parameter is not set then the  infoblox_ip_allocation resource block reserves the next available IP address from the network. However, to set the fixed IP address you need to specify the ip_addr parameter.

If you specify the dns_view and zone parameters, NIOS creates a host record or it creates a fixed IP address. If you want to use the host record for DNS or DHCP purposes, you need to set the value of enable_dns parameter to true.

The following table describes the mandatory and optional parameters used to allocate and associate an IP address.

Sr NoParameterMandatory/OptionalDescription
1network_view_nameOptionalSpecifies the network view name available in the NIOS appliance.
2vm_nameMandatorySpecifies the name of the virtual machine.
3cidrMandatory

Specifies the address in cidr format.

Note

Ensure the network address is available in NIOS, under the required network view (network_view_name).

  

4zoneOptionalSpecifies the zone under which the record has to be created.
5enable_dnsOptionalSpecifies the flag that defines whether the host record is used for DNS or IPAM purposes.
6dns_viewOptionalSpecifies the DNS view under which the zone is created.
7ip_addrOptional

Specifies the IP address of the instance in the cloud.

For static allocation, you need to set the field with a valid IP address.

8mac_addrOptionalSpecifies the MAC address of the instance in the cloud.
9vm_idOptionalSpecifies the instance ID.
10tenant_idMandatory

Specifies the unique identifier of the tenant in the cloud.

Tenant ID is the name of the cloud provider with which you want to integrate. However, if there is no cloud provider, you can specify any dummy value.

The tenant ID differentiates the cloud providers in NIOS. For more information, see Viewing All Tenants.

Note

To create a host record, you need to set the enable_dns and dns_view parameters for infoblox_ip_allocation and infoblox_ip_association resource blocks.

Example

The following examples form the IP address allocation:

resource "infoblox_ip_allocation" "demo_allocation"

{

network_view_name="demo1"

vm_name="vmname1"

cidr="10.0.0.0./24"

tenant_id="test"

}

resource "infoblox_ip_association" "demo_associate"

{
network_view_name="demo1"
vm_name="vmname1"
cidr="10.0.0.0./24"
mac_addr =11:11:11:11:11:11:11
ip_addr="10.0.0.2"
vm_id =testtenant_id="test"

}



  • No labels