» 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" "test" {
  name = "dou_vlan0_test_%d"

  cluster_reference = {
  kind = "cluster"
  UUID = "${data.nutanix_clusters.clusters.entities.0.metadata.UUID}"
}

  vlan_id = 201
  subnet_type = "VLAN"

  prefix_length = 24
  default_gateway_ip = "192.168.0.1"
  subnet_ip = "192.168.0.0"
  #ip_config_pool_list_ranges = ["192.168.0.5", "192.168.0.100"]

  dhcp_options {
    boot_file_name = "bootfile"
    tftp_server_name = "192.168.0.252"
    domain_name = "nutanix"
  }

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

data "nutanix_subnet" "test" {
  subnet_id = "${nutanix_subnet.test.id}"
}

data "nutanix_subnet" "test-name" {
  subnet_name = "${nutanix_subnet.test.name}"
}

» Argument Reference

The following arguments are supported:

» 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: - 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, cluster_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: cluster_reference, subnet_reference does not support the attribute name

See detailed information in Nutanix Subnet.