---
title: "infoblox_ipv4_fixed_address Resource"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/1383235777/infoblox_ipv4_fixed_address%20Resource"
format: markdown
---
This resource enables you to perform create, update, and delete operations on IPv4 fixed address objects. A fixed address is a specific IP address that a DHCP server always assigns when a lease request comes from a particular MAC address of the client.

The following table describes the parameters you can define in a IPv4 fixed address resource block:

| **Parameter** | **Required/**  
**Optional** | **Description** |
| --- | --- | --- |
| `name` | Optional | Specifies the name of the IPv4 fixed address object. |
| `network` | Optional | Specifies the network to which this fixed address belongs. It can be in IPv4 Address or CIDR format. |
| `network_view` | Optional | Specifies the network view in which the fixed address must reside.  
If a value is not specified, `default` will be used as the network view name. |
| `disable` | Optional | Determines whether the fixed address object is disabled.  
The default value is `false`, which means the object is enabled. |
| `use_options` | Optional | Determines whether the `options` field is enabled. The default value is `false`.  
To use `options`, you must set this parameter to `true`. |
| `options` | Optional | Specifies an array of DHCP option structs that lists the DHCP options associated with the object. You can set the following sub parameters for every DHCP option:<br>- `name` (required): Specifies the name of a DHCP option.  
Example: `domain-name-servers`.
- `num` (required): Specifies the code of the DHCP option.
- `value` (required): Specifies the value of the option you are defining.
- `vendor_class`: Specifies the name of the space this DHCP option is associated with. The default value is `DHCP`.
- `use_option`: Determines whether the custom DHCP option that you choose from the below list must be enabled. The default value is `false`.  
These options correspond to those listed in the **Custom DHCP Options** drop-down list in NIOS Grid Manager: `router`, `router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`. |
| `agent_circuit_id` | Optional | Specifies the agent circuit ID for the fixed address. The field is required only when `match_client` is set to `CIRCUIT_ID`. |
| `agent_remote_id` | Optional | Specifies the agent remote ID for the fixed address. The field is required only when `match_client` is set to `REMOTE_ID`. |
| `client_identifier_prepend_zero` | Optional | Determines whether there is a prepend for the dhcp-client-identifier of a fixed address. |
| `dhcp_client_identifier` | Optional | Specifies the DHCP client ID for the fixed address. The field is required only when `match_client` is set to `CLIENT_ID`. |
| `ipv4addr` | Optional | Specifies the IPv4 Address of the fixed address.  
If you configure the `network` field, but do not specify `ipv4addr`, then the next available IP address in the network will be allocated. |
| `mac` | Optional | Specifies the MAC address value for this fixed address. The field is required only when `match_client` is set to its default value `MAC_ADDRESS`. |
| `match_client` | Optional | The match client for the fixed address. Valid values are CIRCUIT_ID, CLIENT_ID , MAC_ADDRESS, REMOTE_ID and RESERVED. |
| `comment` | Optional | Describes the fixed address. |
| `ext_attrs` | Optional | Specifies the set of NIOS extensible attributes that will be attached to the fixed address object. |

> ⚠️ **Note**
> ⚠️ 
> ⚠️ - You must specify the `mac` address parameter or one of `agent_circuit_id`, `agent_remote_id`, and `dhcp_client_identifier` parameters in the resource block.
> ⚠️ - When configuring the `options` parameter, you must define the default option `dhcp-lease-time` to avoid the undesirable changes that can occur when the next `terraform apply` command runs. The sub parameters `name`, `num`, and `value` are required. An example block is as follows:  
> ⚠️ `options {`  
> ⚠️ `    name = "dhcp-lease-time"`  
> ⚠️ `    num = 51`  
> ⚠️ `    value = "43200"`  
> ⚠️ `    use_option = false`  
> ⚠️ `}`

## Examples of the IPv4 Fixed Address Resource Block

`//example for fixed address with maximal parameters and using next available ip function`  
`//ipv4addr not specified and network is given so next available ip in the network will be allocated`  
`resource "infoblox_ipv4_fixed_address" "fix4"{`  
`  client_identifier_prepend_zero=true`  
`  comment= "fixed address"`  
`  dhcp_client_identifier="23"`  
`  disable= true`  
`  ext_attrs = jsonencode({`  
`    "Site": "Blr"`  
`  })`  
`  match_client = "CLIENT_ID"`  
`  name = "fixed_address_1"`  
`  network = "18.0.0.0/24"`  
`  network_view = "default"`  
`  options {`  
`    name = "dhcp-lease-time"`  
`    value = "43200"`  
`    vendor_class = "DHCP"`  
`    num = 51`  
`    use_option = true`  
`  }`  
`  options {`  
`    name = "routers"`  
`    num = "3"`  
`    use_option = true`  
`    value = "18.0.0.2"`  
`    vendor_class = "DHCP"`  
`  }`  
`  use_options = true`  
`  depends_on=[infoblox_ipv4_network.net2]`  
`}`  
`resource "infoblox_ipv4_network" "net2" {`  
`  cidr = "18.0.0.0/24"`  
`}`  
`//creates a fixed address by explicitly providing the ipv4addr value instead of using the next available IP function.`  
`resource "infoblox_ipv4_fixed_address" "fix3"{`  
`  ipv4addr = "10.0.0.9"`  
`  mac = "00:0C:24:2E:8F:2A"`  
`  options {`  
`    name = "dhcp-lease-time"`  
`    value = "43200"`  
`    vendor_class = "DHCP"`  
`    num = 51`  
`    use_option = true`  
`  }`  
`  depends_on=[infoblox_ipv4_network.net3]`  
`}`  
`resource "infoblox_ipv4_network" "net3" {`  
`  cidr = "10.0.0.0/24"`  
`}`