Terraform Infoblox Provider
The Inflbox provider is used to interact with the resources supported by Infoblox. The provider needs to be configured with the proper credentials before it can be used.
Download builds for Darwin, Linux and Windows from the releases page.
# Configure the Infoblox provider
provider "infoblox" {
username = "${var.infoblox_username}"
password = "${var.infoblox_password}"
host = "${var.infoblox_host}"
sslverify = "${var.infoblox_sslverify}"
usecookies = "${var.infoblox_usecookies}"
}
# Create a record
resource "infoblox_record" "www" {
...
}
The following arguments are supported:
username
- (Required) The Infoblox username. It must be provided, but it can also be sourced from theINFOBLOX_USERNAME
environment variable.password
- (Required) The password associated with the username. It must be provided, but it can also be sourced from theINFOBLOX_PASSWORD
environment variable.host
- (Required) The base url for the Infoblox REST API, but it can also be sourced from theINFOBLOX_HOST
environment variable.sslverify
- (Required) Enable ssl for the REST api, but it can also be sourced from theINFOBLOX_SSLVERIFY
environment variable.usecookies
- (Optional) Use cookies to connect to the REST API, but it can also be sourced from theINFOBLOX_USECOOKIES
environment variable
Provides a Infoblox record resource.
# Add a record to the domain
resource "infoblox_record" "foobar" {
value = "192.168.0.10"
name = "terraform"
domain = "mydomain.com"
type = "A"
ttl = 3600
}
See related part of Infoblox Docs for details about valid values.
The following arguments are supported:
domain
- (Required) The domain to add the record tovalue
- (Required) The value of the record; its usage will depend on thetype
(see below)name
- (Required) The name of the recordttl
- (Integer, Optional) The TTL of the recordtype
- (Required) The type of the record
The type of record being created affects the interpretation of the value
argument.
value
is the hostname
value
is the alias name
value
is the IPv6 address
The following attributes are exported:
domain
- The domain of the recordvalue
- The value of the recordname
- The name of the recordtype
- The type of the recordttl
- The TTL of the record
Queries the next available IP address from a network and returns it in a computed variable that can be used by the infoblox_record resource.
# Acquire the next available IP from a network CIDR
#it will create a variable called "ipaddress"
resource "infoblox_ip" "theIPAddress" {
cidr = "10.0.0.0/24"
}
# Add a record to the domain
resource "infoblox_record" "foobar" {
value = "${infoblox_ip.theIPAddress.ipaddress}"
name = "terraform"
domain = "mydomain.com"
type = "A"
ttl = 3600
}
The following arguments are supported:
cidr
- (Required) The network to search for - example 10.0.0.0/24