---
title: "infoblox_ipv4_range Data Source"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/1383235813/infoblox_ipv4_range%20Data%20Source"
format: markdown
---
The data source for the IPv4 range object allows you to get the following parameters for an IPv4 range resource:

| **Parameter** | **Description** | **Example** |
| --- | --- | --- |
| `name` | The name of the DHCP range. | `range1` |
| `network` | The network to which this range belongs. | `192.0.2.0/24` |
| `network_view` | The network view in which this range resides. | `default` |
| `start_addr` | The starting address of the IPv4 address range. | `192.0.2.20` |
| `end_addr` | The ending address of the IPv4 address range. | `192.0.2.40` |
| `disable` | Indicates whether the range object is disabled. | `false` |
| `failover_association` | The name of the failover association. The server in this failover association serves the IPv4 range when the main server is out of service. | `dhcp_failover` |
| `options` | An array of DHCP option structs that lists the DHCP options associated with the object. | `{`  
`    name = "dhcp-lease-time"`  
`    value = "43200"`  
`    vendor_class = "DHCP"`  
`    num = 51`  
`    use_option = true`  
`  }` |
| `ms_server` | The IP address of the Microsoft server that provides service for this range. when `server_association_type` is  set to `MS_SERVER`. | `192.0.2.255` |
| `member` | The member that provides service for this range. This value is returned when `server_association_type` is set to `MEMBER`. | `{`  
`  ipv4addr = "192.168.2.4"`  
`  ipv6addr = "2001:db8:1:2:3:4:5:6"`  
`  name = "infoblox.localdomain"`  
`}` |
| `use_options` | Indicates whether the `options` field is enabled. | `true` |
| `server_association_type` | The type of server that is going to serve the range. | `FAILOVER` |
| `cloud_info` | The structure that contains all cloud API related information for this object. | `"{\"authority_type\":\"GM\",\"delegated_scope\":\"NONE\",\"owned_by_adaptor\":false}"` |
| `comment` | A description of the IPv4 range. This is a regular comment. | `Untrusted network` |
| `ext_attrs` | The set of extensible attributes, if any. The content is formatted as a string of JSON map. | `{\"Owner\":\"State Library\",\"Administrator\":\"unknown\"}` |

To retrieve information about IPv4 range objects that match the specified filters, use the `filters` argument and specify the parameters mentioned in the below table. These are the searchable parameters of the corresponding object in Infoblox NIOS WAPI. If you do not specify any parameter, the data source retrieves information about all IPv4 range in the NIOS Grid.

The following table describes the parameters you can define in an `infoblox_ipv4_range` data source block:

| **Parameter** | **Alias*** | **Description** |
| --- | --- | --- |
| `name` | `name` | Specifies the name of the DHCP range. |
| `network` | `network` | Specifies the network to which this range belongs. |
| `network_view` | `network_view` | Specifies the network view in which this range resides. |
| `start_addr` | `start_addr` | Specifies the starting address of the IPv4 address range. |
| `end_addr` | `end_addr` | Specifies the ending address of the IPv4 address range. |
| `failover_association` | `failover_association` | Specifies the name of the failover association. |
| `server_association_type` | `server_association_type` | Specifies the type of server that is going to serve the range. |
| `comment` | `comment` | Describes the range. |
| Extensible Attributes | - | Specifies the extensible attributes specified for the range. You must specify the key/value pair within the `filters` argument.  
Example:  
`filters = {`  
`"*Site" = "some test site"`  
`}` |

*Aliases are the parameter names used in the prior releases of Infoblox IPAM Plug-In for Terraform. Do not use the alias names for parameters in the data source blocks. Using them can result in error scenarios.

> ⚠️ **Note**
> ⚠️ 
> ⚠️ The search functionality using the `filters` argument is not supported for `member` and `ms_server` fields.

## Example of an IPv4 Range Data Source Block

`resource "infoblox_ipv4_range" "range" {`  
`  start_addr = "192.0.2.20"`  
`  end_addr = "192.0.2.40"`  
`  options {`  
`    name = "dhcp-lease-time"`  
`    value = "43200"`  
`    vendor_class = "DHCP"`  
`    num = 51`  
`    use_option = true`  
`  }`  
`  network = "192.0.0.0/24"`  
`  network_view = "default"`  
`  comment = "test comment"`  
`  name = "test_range"`  
`  disable = false`  
`  member = {`  
`    name = "infoblox.localdomain"`  
`  }`  
`  server_association_type= "MEMBER"`  
`  ext_attrs = jsonencode({`  
`    "Site" = "Blr"`  
`  })`  
`  use_options = true`  
`}`

`data "infoblox_ipv4_range" "range_rec_temp" {`  
`  filters = {`  
`    start_addr = "192.0.2.20"`  
`  }`  
`  depends_on = [infoblox_ipv4_range.range]`  
`}`

`output "range_rec_res" {`  
`  value = data.infoblox_ipv4_range.range_rec_temp`  
`}`  


`//accessing range through EA`  
`data "infoblox_ipv4_range" "range_rec_temp_ea" {`  
`  filters = {`  
`    "*Site" = "Blr"`  
`  }`  
`}`

`output "range_rec_res1" {`  
`  value = data.infoblox_ipv4_range.range_rec_temp_ea`  
`}`