---
title: "Instance Configuration File"
canonical: "https://docs.infoblox.com/space/DeploymentGuideTerraformNIOSProvider/807043803/Instance%20Configuration%20File"
format: markdown
---
1. **[Ubuntu]** Open the **multiple_rsources.tf** file in VScode.
2. **[Ubuntu]** Open the the **terraform.tfvars** file in VScode.

![image](media://bb9fc333-d0ed-4343-b127-28ce7e942367)

4. We will examine each block in the files. *Note: The terraform and provider blocks are the same in each configuration file and are not covered again here. If you would like to review details regarding the terraform and provider blocks, please see pages 5-6.*

- The** terraform.tfvars** file contains the variables for input to the multiple_resources.tf configuration. Variables are listed in a <variable name> = <value> format.

![image](media://38f50e46-c25b-4159-89fc-ed3383962909)

- The **variable** blocks in the m**ultiple_resources.tf** file define the variable names and types that will be used in this configuration.

![image](media://2079d054-6bec-4f83-92dc-81ca5371b9b9)

- The first resource block creates an **infoblox_ipv4_network_container**. Note the extensible attributes **Tenant ID**, **CMP Type**, **Cloud API Owned**. Adding these extensible attributes to an appropriate object creates it as a cloud object in the Grid and are required for use with Infoblox Cloud Network Automation (CNA).

![image](media://7f5d6c17-cc7b-4a35-87b3-7137ce46f932)

- The second resource block creates 1 or more **infoblox_ipv4_network** objects, based on the value provided for the **count** argument. The value of count in this case is provided by a reference to the** network_count** variable.

*Note: The count argument is available for all Terraform resource blocks.*

- The **parent_cidr **argument uses a reference to the cidr attribute of the **infoblox_ipv4_network_container.ipv4_container** resource above to allocate new networks using the next available network function.
- In the value for the comment argument, the expression** ${count.index +1} **inserts the current count plus 1. Count starts at 0 for the first network and increases by 1 for each consecutive network created.

![image](media://f18af8eb-dd1f-411f-aa12-81bdb37d3097)

- The next resource block uses the **infoblox_ipv4_allocation** type to add 1 or more Hosts to the Grid in the first new network created in this configuration.
- The **fqdn **argument specifies a unique name, which is concatenated to an existing DNS zone to create a Host record in this zone. In this example, the first Host record added to the [ibxdemo.com](http://ibxdemo.com) zone will be named **demo-vm1**.
- The **cidr** argument references the cidr attribute of the first network created by the **infoblox_ipv4_network.dynamic_ipv4** resource block using the **[0]** index.
- The **enable_dns** argument specifies whether or not to enable the DNS flag for the Host records.

![image]()

- The final resource block uses the **infoblox_ipv4_association** type to map specific VMs to the Host records created by the previous block. *Note: In this demo no actual VMs are created and specific values that would normally come from a cloud provider resource are simulated.*
- The **network_view**, **dns_view**, **fqdn**, **enable_dns**, and **ip_addr** arguments use the **element** function to reference attributes from the correct **infoblox_ipv4_allocation** resource, based on the current count.
- The **mac_addr **argument and **VM ID** extensible attribute will usually be provided by a reference to the cloud provider resource which created the VM. They are simulated here for demo purposes.

![image]()