» nutanix_subnet

Provides a resource to create a subnet based on the input parameters. A subnet is a block of IP addresses.

» Example Usage

data "nutanix_clusters" "clusters" {
  metadata = {
    length = 2
  }
}

output "cluster" {
  value = "${data.nutanix_clusters.clusters.entities.0.metadata.uuid}"
}

resource "nutanix_subnet" "next-iac-managed" {
  # What cluster will this VLAN live on?
  cluster_uuid = "${data.nutanix_clusters.clusters.entities.0.metadata.uuid}"

  # General Information
  name        = "next-iac-managed-%d"
  vlan_id     = 101
  subnet_type = "VLAN"

  # Managed L3 Networks
  # This bit is only needed if you intend to turn on IPAM
  prefix_length = 20

  default_gateway_ip = "10.5.80.1"
  subnet_ip          = "10.5.80.0"

  dhcp_domain_name_server_list = ["8.8.8.8", "4.2.2.2"]
  dhcp_domain_search_list      = ["nutanix.com", "eng.nutanix.com"]
}

» Argument Reference

» Attributes Reference

The following attributes are exported:

» Metadata

The metadata attribute exports the following:

  • last_update_time: - UTC date and time in RFC-3339 format when subnet was last updated.
  • uuid: - The subnet UUID.
  • creation_time: - UTC date and time in RFC-3339 format when subnet was created.
  • spec_version: - Version number of the latest spec.
  • spec_hash: - Hash of the spec. This will be returned from server.
  • name: - subnet name.

» Categories

The categories attribute supports the following:

  • name: - the key name.
  • value: - value of the key.

» Reference

The project_reference, owner_reference, availability_zone_reference, network_function_chain_reference, subnet_reference.

attributes supports the following:

  • kind: - The kind name (Default value: project)(Required).
  • name: - the name(Optional).
  • uuid: - the UUID(Required).

Note: subnet_reference does not support the attribute name

See detailed information in Nutanix Subnet.