vmware / terraform-provider-nsxt

Terraform Provider for VMware NSX
https://registry.terraform.io/providers/vmware/nsxt/
Mozilla Public License 2.0
131 stars 84 forks source link

nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0 #1134

Open rubinthomas opened 8 months ago

rubinthomas commented 8 months ago

Describe the bug

Error: Provider produced inconsistent final plan

_When expanding the plan for nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage1["SRH9XGGUI"] to include new values learned so far during apply, provider

_"registry.terraform.io/vmware/nsxt" produced an invalid new value for .macaddress: was cty.StringVal("00:50:56:b7:b7:14"), but now cty.StringVal("00:50:56:b7:38:63").

This is a bug in the provider, which should be reported in the provider's own issue tracker.

NXT_static_mac_bug

Reproduction steps

When creating a VM from a template with a use_static_mac = false and assigning the VM with the dynamic mac address generated from the VM assignment to a NSX DHCP static binding it fails with above error

Code:

resource "vsphere_virtual_machine" "stage0" {
....
  dynamic "network_interface" {
    for_each = each.value.template.network_interfaces
    content {
      network_id     = data.vsphere_network.vm_net.id
      adapter_type   = network_interface.value["adapter_type"]
      use_static_mac = false
      mac_address    = network_interface.value["mac_address"]
    }
  }
....
}

resource "nsxt_policy_dhcp_v4_static_binding" "static_ip_mac_stage0" {
....
mac_address     =  vsphere_virtual_machine.stage1["SRH9XG_GUI"].network_interface[0].mac_address
....
}

Expected behavior

It should assign the VM mac address from generated VM to the NSXT nsxt_policy_dhcp_v4_static_binding resource to assign a Mac Address to allow for binding the generated dynamic mac address to the VM

Additional context

No response

annakhm commented 8 months ago

Hi @rubinthomas, thanks for filing this issue! According to your log and config, it looks like your static binding resource is dependent on virtual machine resource, however the dependency is not respected in create - since the static binding resource is created first. Could I ask you to run terraform graph on you configuration and paste the result?

annakhm commented 8 months ago

Also more detailed config would help us replicate this

rubinthomas commented 8 months ago

Not sure how to give the full code but here is the sample of it

main.tf

locals {
  event_name          = var.event == "" ? "IRLP" : trim(replace("${var.event}", "/[~`!@#$%^&*()+={}|;\"'?<>,. ]+/", ""), " ")
  deploy              = var.deploy_folder == "" ? "DEV" : trim(replace("${var.deploy_folder}", "/[~`!@#$%^&*()+={}|;\"'?<>,. ]+/", ""), " ")
  template_folder     = var.template_folder == "" ? "GOLDEN_MASTER" : trim(replace("${var.template_folder}", "/[~`!@#$%^&*()+={}|;\"'?<>,. ]+/", ""), " ")
  course_code         = var.courseCode == "" ? "RH9XG" : trim(replace("${var.courseCode}", "/[~`!@#$%^&*()+={}|;\"'?<>,. ]+/", ""), " ")
  template_code       = var.templateCode == "" ? local.course_code : trim(replace("${var.templateCode}", "/[~`!@#$%^&*()+={}[]|;\"'?<>,. ]+/", ""), " ")
  class               = var.className == "" ? null : trim(replace("${var.className}", "/[~`!@#$%^&*()+={}|;\"'?<>,._-]+/", ""), " ")
  class_type          = local.event_name == "IRLP" ? lower("${local.deploy}") : ""
  class_n             = local.class_type != "" && local.class != null ? split("_", replace(local.class, "/[[:alpha:]._-]+/", "_")) : null
  class_num           = local.class_n != null ? local.class_n.0 : ""                             
  student_num         = local.class_n != null ? local.class_n.1 : ""            
  stdnum_max          = var.concMax != "" && tonumber(var.concMax) <= 30 ? tonumber(var.concMax) : 2
  stdnum_val          = var.stdNum != "" ? tonumber(var.stdNum) : 1
  stdnum              = local.stdnum_val <= local.stdnum_max ? local.stdnum_val : 1
  envnum              = var.envNum != "" ? tonumber(var.envNum) : tonumber(local.student_num != "" ? local.student_num : 0)
  ranges              = (var.nsxt_subnet_range != "") || (var.nsxt_subnet_range != "auto") ? [var.nsxt_subnet_range] : ["auto"]
  parentReservationId = (var.parentReservationId != "" && var.parentReservationId != "none") ? "_${var.parentReservationId}" : (var.reservationId != "" && var.reservationId != "none") ? "_${var.reservationId}" : ""
  root_name           = "${local.event_name}_${local.deploy}_${local.course_code}_${local.class}${local.parentReservationId}"
  fname               = "${local.root_name}${format("_%03d", local.envnum)}"                                                       
  nsxt_prefix         = trim("${local.root_name}", "= ")                                                                          
  nsxt_subnet_cidr    = var.nsxt_subnet_cidr != "10.100.0.1/24" ? var.nsxt_subnet_cidr : "${cidrhost(var.nsxt_subnet_cidr, 1)}/24" # Check value is same default SUBNET CIDR variable
  cidr_parts          = split("/", local.nsxt_subnet_cidr)
  host_bits           = 32 - tonumber(local.cidr_parts[1])
  max_hosts           = pow(2, local.host_bits) - 2
  last_host           = local.max_hosts - 2
  nsxt_dns_ip         = var.nsxt_dns == "auto" ? cidrhost(local.nsxt_subnet_cidr, local.last_host) : var.nsxt_dns
  nsxt_dns_l          = var.nsxt_dns == "auto" ? [var.ad_hostname, "10.0.80.11"] : [var.nsxt_dns, var.ad_hostname]
  nsxt_dns_servers    = var.nsxt_dhcp == false ? local.nsxt_dns_l : [var.ad_hostname, "10.0.80.11"]
  nsxt_dhcp_sa        = var.nsxt_subnet_server_address == "auto" ? "${cidrhost(local.nsxt_subnet_cidr, tonumber(local.max_hosts - 1))}/${tonumber(local.cidr_parts[1])}" : var.nsxt_subnet_server_address 
  nsxt_dhcp_range     = var.nsxt_dhcp == false ? (local.ranges.0 == "auto" ? ["${cidrhost(local.nsxt_subnet_cidr, 1)}-${cidrhost(local.nsxt_subnet_cidr, local.last_host)}"] : local.ranges) : (local.ranges.0 == "auto" ? ["${cidrhost(local.nsxt_subnet_cidr, 1)}-${cidrhost(local.nsxt_subnet_cidr, local.last_host)}"] : local.ranges)
  vm_map              = jsondecode(var.vms_map) 
  vm_count            = length(local.vm_map)
  start_host          = tonumber(3 + local.vm_count) 
  nsxt_dhcp_ranges = (            
    local.nsxt_dhcp_range.0 == "auto" ? ["${cidrhost(local.nsxt_subnet_cidr, local.start_host)}-${cidrhost(local.nsxt_subnet_cidr, local.last_host)}"] :
    (
      local.ranges.0 == "auto" ? ["${cidrhost(local.nsxt_subnet_cidr, local.start_host)}-${cidrhost(local.nsxt_subnet_cidr, local.last_host)}"] : local.ranges
    )
  )
}

data "vsphere_datacenter" "dc" {
  name = var.vsphere_datacenter
}

data "external" "datastore" {
  program = ["pwsh", "${path.module}/scripts/GetDatastore.ps1"]
  query = {
    VCname           = var.vsphere_server
    VCUser           = var.vsphere_user
    VCPassword       = var.vsphere_password
    datastoreCluster = var.shared_datastore
  }
}

data "vsphere_datastore" "datastore_vm" {
  name          = data.external.datastore.result.datastore
  datacenter_id = data.vsphere_datacenter.dc.id
}

data "vsphere_compute_cluster" "compute_cluster" {
  name          = "/${var.vsphere_datacenter}/host/${var.vsphere_cluster}/"
  datacenter_id = data.vsphere_datacenter.dc.id
}

data "vsphere_resource_pool" "root_pool" {
  name          = "/${var.vsphere_datacenter}/host/${var.vsphere_cluster}/Resources/${var.root_terraform}/"
  datacenter_id = data.vsphere_datacenter.dc.id
}

resource "vsphere_resource_pool" "child_pool" {
  name                    = local.nsxt_prefix
  parent_resource_pool_id = data.vsphere_resource_pool.root_pool.id
}

data "vsphere_folder" "root_folder" {
  path = "/${var.vsphere_datacenter}/vm/${var.vsphere_cluster}/${var.root_terraform}"
}

resource "vsphere_folder" "folder" {
  path          = "${var.vsphere_cluster}/${var.root_terraform}/${local.root_name}${format("_%03d", local.envnum)}"
  type          = "vm"
  datacenter_id = data.vsphere_datacenter.dc.id
  depends_on = [
    data.vsphere_folder.root_folder
  ]
}

resource "time_sleep" "wait_10_seconds" {
  create_duration = "10s"
  depends_on = [
    nsxt_policy_segment.seg
  ]
}

data "vsphere_distributed_virtual_switch" "vds" {
  name          = "${replace(var.network_segment_prefix, "-", "")}-${var.vsphere_cluster}-private" 
  datacenter_id = data.vsphere_datacenter.dc.id
}

data "vsphere_network" "vm_net" {
  name                            = data.nsxt_policy_segment_realization.seg.network_name
  datacenter_id                   = data.vsphere_datacenter.dc.id
  distributed_virtual_switch_uuid = data.vsphere_distributed_virtual_switch.vds.id
  depends_on = [
    time_sleep.wait_10_seconds
  ]
}

resource "null_resource" "clean_folder" {
  triggers = {
    vsphere_server   = var.vsphere_server
    vsphere_user     = var.vsphere_user
    vsphere_password = nonsensitive(var.vsphere_password)
    clean_name       = local.fname
  }
  provisioner "local-exec" {
    when    = destroy
    command = "pwsh ${path.module}/scripts/CleanFolder.ps1"
    environment = {
      VCname     = self.triggers.vsphere_server
      VCUser     = self.triggers.vsphere_user
      VCPassword = self.triggers.vsphere_password
      FolderName = self.triggers.clean_name
    }
  }
  depends_on = [
    vsphere_folder.folder,
    nsxt_policy_segment.seg
  ]
}

vm.tf

locals {
  vsphere_template = "${var.vsphere_cluster}/${var.root_template_folder}/${local.template_folder}/${local.template_code}"
}

data "vsphere_virtual_machine" "vm_template" {
  for_each      = local.vm_map
  name          = "${local.vsphere_template}/${each.value.tmpl}"
  datacenter_id = data.vsphere_datacenter.dc.id
}

locals {
  stage0 = { for key, val in local.vm_map : key => val if val.stage == 0 || val.stage == "0" }
}

resource "time_sleep" "wait_x_seconds_stage0" {
  for_each = { for idx, key in keys(local.stage0) :
    key => {
      name  = key
      delay = local.vm_map[key].delay
    }
  }
  create_duration = "${each.value.delay}s"
  depends_on = [
    data.vsphere_virtual_machine.vm_template
  ]
}

resource "vsphere_virtual_machine" "stage0" {
  for_each = { for idx, key in keys(local.stage0) :
    key => {
      name     = "${local.class}_${key}"
      template = data.vsphere_virtual_machine.vm_template[key]
    }
  }
  name = each.value.name

  resource_pool_id = vsphere_resource_pool.child_pool.id
  datastore_id     = data.vsphere_datastore.datastore_vm.id
  folder           = vsphere_folder.folder.path

  sync_time_with_host              = "true"
  sync_time_with_host_periodically = "true"
  enable_disk_uuid                 = "true"

  num_cpus               = each.value.template.num_cpus
  num_cores_per_socket   = each.value.template.num_cores_per_socket
  cpu_hot_add_enabled    = true
  cpu_hot_remove_enabled = true
  memory                 = each.value.template.memory
  memory_hot_add_enabled = true
  guest_id               = each.value.template.guest_id
  firmware               = each.value.template.firmware
  hv_mode                = each.value.template.hv_mode
  nested_hv_enabled      = each.value.template.nested_hv_enabled
  scsi_type              = each.value.template.scsi_type

  dynamic "network_interface" {
    for_each = each.value.template.network_interfaces
    content {
      network_id     = data.vsphere_network.vm_net.id
      adapter_type   = network_interface.value["adapter_type"]
      use_static_mac = (local.vm_map[each.key].static == true) || (local.vm_map[each.key].static == 1) || (local.vm_map[each.key].static == "true") ? true : false
      mac_address    = (local.vm_map[each.key].static == true) || (local.vm_map[each.key].static == 1) || (local.vm_map[each.key].static == "true") ? network_interface.value["mac_address"] : ""
    }
  }

  dynamic "disk" {
    for_each = each.value.template.disks
    content {
      label            = disk.value["label"]
      size             = disk.value["size"]
      eagerly_scrub    = disk.value["eagerly_scrub"]
      thin_provisioned = disk.value["thin_provisioned"]
      unit_number      = disk.value["unit_number"]
    }
  }

  clone {
    template_uuid = each.value.template.id
    timeout       = 360
    linked_clone  = var.linked_clone
  }

  lifecycle {
    ignore_changes = all
  }

  wait_for_guest_net_timeout = 0
  wait_for_guest_net_routable = false

  depends_on = [
    time_sleep.wait_x_seconds_stage0,
    nsxt_policy_segment.seg,
    null_resource.clean_folder
  ]
}

resource "nsxt_policy_dhcp_v4_static_binding" "static_ip_mac_stage0" {
  for_each = { for idx, key in keys(local.stage0) :
    key => {
      name     = key
      ip       = local.vm_map[key].ip
      static   = local.vm_map[key].static
      hostname = local.vm_map[key].hostname
      template = data.vsphere_virtual_machine.vm_template[key]
    }
  }

  segment_path    = nsxt_policy_segment.seg.path
  display_name    = "${local.nsxt_prefix}_${each.value.name}"
  description     = var.nsxt_dhcp == false ? "Terraform STATIC IP & MAC DHCP-SEG-${local.nsxt_prefix}_${each.value.name}" : "Terraform DYNAMIC IP & MAC DHCP-SEG-${local.nsxt_prefix}_${each.value.name}"
  lease_time      = 86400
  gateway_address = local.cidr_parts[0] 
  hostname        = each.value.hostname
  ip_address      = each.value.ip
  mac_address     = (each.value.static == true) || (each.value.static == 1) || (each.value.static == "true") ? each.value.template.network_interfaces[0]["mac_address"] : vsphere_virtual_machine.stage0[each.key].network_interface[0].mac_address

  depends_on = [
    time_sleep.wait_x_seconds_stage0,
    nsxt_policy_segment.seg,
    vsphere_virtual_machine.stage0
  ]
}

locals {
  vm_list = merge(vsphere_virtual_machine.stage0, vsphere_virtual_machine.stage1, vsphere_virtual_machine.stage2, vsphere_virtual_machine.stage3, vsphere_virtual_machine.stage4,
    vsphere_virtual_machine.stage5
  )
}

out.tf

output "vm_table" {
  description = "Virtual Machines"
  value = [
    for vm in local.vm_list : {
      name          = vm.name,
      folder        = vm.folder,
      resource_pool = vsphere_resource_pool.child_pool.name,
      network       = data.nsxt_policy_segment_realization.seg.network_name,
      num_cpus      = "${vm.num_cpus} vCPUs",
      memory        = "${vm.memory / 1024} GB",
      moid          = vm.moid,
      uuid          = vm.id,
      mac           = vm.network_interface.0.mac_address,
      ip            = vm.guest_ip_addresses.0,
    }
  ]
}

NSX.tf


data "nsxt_policy_tier0_gateway" "T0" {
  display_name = "T0-workload-${var.network_segment_prefix}-${var.network_segment_prefix}"
}

data "nsxt_policy_edge_cluster" "T0_EC" {
  display_name = "${var.network_segment_prefix}-${var.network_segment_prefix}-workload-edge-cluster"
}

data "nsxt_policy_edge_node" "edge_node_1" {
  display_name      = var.edge_node_1
  edge_cluster_path = data.nsxt_policy_edge_cluster.T0_EC.path
}

data "nsxt_policy_edge_node" "edge_node_2" {
  display_name      = var.edge_node_2
  edge_cluster_path = data.nsxt_policy_edge_cluster.T0_EC.path
}

resource "nsxt_policy_tier1_gateway" "T1" {
  display_name              = local.nsxt_prefix
  nsx_id                    = local.nsxt_prefix
  description               = "T1-${local.nsxt_prefix}"
  edge_cluster_path         = data.nsxt_policy_edge_cluster.T0_EC.path
  failover_mode             = "NON_PREEMPTIVE"
  default_rule_logging      = "false"
  enable_firewall           = "true"
  enable_standby_relocation = "false"
  tier0_path                = data.nsxt_policy_tier0_gateway.T0.path
  route_advertisement_types = ["TIER1_NAT"] 
  pool_allocation           = "ROUTING"

  tag {
    scope = "T1-${local.nsxt_prefix}"
    tag   = local.course_code
  }
}

resource "nsxt_policy_ip_address_allocation" "nat_ip" {
  display_name = "T1-SNAT-${local.nsxt_prefix}-IP-Assigned"
  pool_path    = data.nsxt_policy_ip_pool.nat_pool.path
}

data "nsxt_policy_ip_pool" "nat_pool" {
  display_name = "SNAT_POOL_AUTO"
}

resource "nsxt_policy_nat_rule" "T1_SNAT_Rule" {
  display_name        = local.nsxt_prefix
  nsx_id              = local.nsxt_prefix
  description         = "T1-SNAT-${local.nsxt_prefix}"
  action              = "SNAT"
  translated_networks = [nsxt_policy_ip_address_allocation.nat_ip.allocation_ip] 
  gateway_path        = nsxt_policy_tier1_gateway.T1.path
  logging             = false
  firewall_match      = "MATCH_INTERNAL_ADDRESS"
  rule_priority       = 0

  tag {
    scope = "T1-SNAT-${local.nsxt_prefix}"
    tag   = local.course_code
  }
}

resource "nsxt_policy_gateway_policy" "DNS_policy" {
  category        = "LocalGatewayRules"
  display_name    = "Allow DNS"
  locked          = false
  sequence_number = 1
  stateful        = true
  tcp_strict      = true
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "DNS"
    services = [
      "/infra/services/DNS",
      "/infra/services/DNS-UDP"
    ]
    scope = [nsxt_policy_tier1_gateway.T1.path]
  }
}

resource "nsxt_policy_gateway_policy" "ICMP_policy" {
  category        = "LocalGatewayRules"
  display_name    = "Allow ICMP"
  locked          = false
  sequence_number = 2
  stateful        = true
  tcp_strict      = true
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "ICMP"
    services     = ["/infra/services/ICMP-ALL"]
    scope        = [nsxt_policy_tier1_gateway.T1.path]
  }
}

resource "nsxt_policy_gateway_policy" "WEB_policy" {
  category        = "LocalGatewayRules"
  display_name    = "Allow WEB Traffic"
  locked          = false
  sequence_number = 3
  stateful        = true
  tcp_strict      = true
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "HTTP_HTTPS"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
    services = [
      "/infra/services/HTTP",
      "/infra/services/HTTPS"
    ]
  }
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "HTTP_ALT_HTTPS_ALT"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
    services = [
      "/infra/services/HTTP_ALT",
      "/infra/services/HTTPS_ALT"
    ]
  }
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "HTTP2"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
    services = [
      "/infra/services/HTTPS,_net.tcp_binding",
      "/infra/services/Oracle_HTTP_Server_SSL_port",
      "/infra/services/SAP_HTTP_Server_2"
    ]
    profiles = ["/infra/context-profiles/HTTP2"]
  }
  rule {
    action       = "ALLOW"
    direction    = "IN_OUT"
    disabled     = false
    display_name = "SSL"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
    services = [
      "/infra/services/HTTPS",
      "/infra/services/HTTPS,_net.tcp_binding",
      "/infra/services/Oracle_HTTP_Server_SSL_port"
    ]
    profiles = ["/infra/context-profiles/SSL"]
  }
}

resource "nsxt_policy_gateway_policy" "OUTGOING_policy" {
  category        = "LocalGatewayRules"
  display_name    = "Allow OUTGOING"
  locked          = false
  sequence_number = 9
  stateful        = true
  tcp_strict      = true
  rule {
    action       = "ALLOW"
    direction    = "OUT"
    disabled     = false
    display_name = "OUTGOING"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
    services     = ["/infra/services/OUTGOING"]
  }
}
resource "nsxt_policy_gateway_policy" "Default_fw_policy" {
  category        = "LocalGatewayRules"
  display_name    = "DEFAULT"
  locked          = false
  sequence_number = 10
  stateful        = true
  tcp_strict      = true
  rule {
    action       = "REJECT"
    direction    = "IN"
    disabled     = false
    display_name = "ALL"
    scope        = [nsxt_policy_tier1_gateway.T1.path]
  }
}

resource "nsxt_policy_dhcp_server" "segment_dhcp" {
  display_name      = local.nsxt_prefix
  nsx_id            = local.nsxt_prefix
  description       = "DHCP-SEG-${local.nsxt_prefix}"
  edge_cluster_path = data.nsxt_policy_edge_cluster.T0_EC.path
  lease_time        = 86400
  server_addresses  = ["${local.nsxt_dhcp_sa}"]
  tag {
    scope = "T1-${local.nsxt_prefix}"
    tag   = local.course_code
  }
}

data "nsxt_policy_transport_zone" "vm_overlay" {
  display_name = "${var.network_segment_prefix}-tz-vm-overlay"
}

data "nsxt_policy_ip_discovery_profile" "ip_dis_prof" {
  display_name = "default-ip-discovery-profile"
}

data "nsxt_policy_mac_discovery_profile" "mac_dis_prof" {
  display_name = var.nsxt_promiscuous_mode ? "MAC-Learn-Profile" : "default-mac-discovery-profile"
}

data "nsxt_policy_segment_security_profile" "sec_prof" {
  display_name = "default-segment-security-profile"
}

data "nsxt_policy_spoofguard_profile" "spoofg_prof" {
  display_name = "default-spoofguard-profile"
}

resource "nsxt_policy_segment" "seg" {
  display_name        = local.nsxt_prefix
  nsx_id              = local.nsxt_prefix
  description         = "Segment LAN ${local.nsxt_prefix}-T1S"
  transport_zone_path = data.nsxt_policy_transport_zone.vm_overlay.path
  connectivity_path   = nsxt_policy_tier1_gateway.T1.path
  dhcp_config_path    = nsxt_policy_dhcp_server.segment_dhcp.path

  security_profile {
    security_profile_path   = data.nsxt_policy_segment_security_profile.sec_prof.path
    spoofguard_profile_path = data.nsxt_policy_spoofguard_profile.spoofg_prof.path
  }
  discovery_profile {
    ip_discovery_profile_path  = data.nsxt_policy_ip_discovery_profile.ip_dis_prof.path
    mac_discovery_profile_path = data.nsxt_policy_mac_discovery_profile.mac_dis_prof.path
  }

  subnet {
    cidr        = local.nsxt_subnet_cidr 
    dhcp_ranges = local.nsxt_dhcp_ranges
    dhcp_v4_config {
      server_address = local.nsxt_dhcp_sa 
      lease_time     = 86400
      dns_servers    = local.nsxt_dns_servers
    }
  }

  tag {
    scope = "T1-${local.nsxt_prefix}"
    tag   = local.course_code
  }

}

data "nsxt_policy_segment_realization" "seg" {
  path = nsxt_policy_segment.seg.path
}

Basically I'm passing an array of VM Templates to clone as VMs to be deployed. Everything works as expected. The only issue is the nsx network assignment of static IP from a VM template that has a existing Mac Address

terraform.tfvars

nsxt_local_domain          = "example.com"
nsxt_dhcp                  = false
nsxt_dns                   = "10.100.0.2"
nsxt_subnet_cidr           = "10.100.0.1/24"
nsxt_subnet_server_address = "10.100.0.254/24"
nsxt_subnet_range          = "auto"
template_folder            = "GOLDEN_MASTER"
event                      = "IRLP"
deploy_folder              = "DEV"
className                  = "RUBIN"
reservationId              = "2020rt2021rt2022rt2023rt"
parentReservationId        = "2020rt2021rt2022rt2023rt"
concMax                    = 5
envNum                     = 0
courseCode                 = "SRH9XG"
templateCode               = "SRH9XG"

vms_map = "{\"SRH9XG_SRV3\":{\"tmpl\":\"SRH9XG_02_SRV\",\"ip\":\"10.100.0.3\",\"static\":true,\"hostname\":\"srv3\",\"stage\":0,\"delay\":30},\"SRH9XG_JB1\":{\"tmpl\":\"SRH9XG_01_GUI\",\"ip\":\"10.100.0.4\",\"static\":true,\"hostname\":\"jb1\",\"stage\":0,\"delay\":30},\"SRH9XG_JB2\":{\"tmpl\":\"SRH9XG_01_GUI\",\"ip\":\"10.100.0.5\",\"static\":false,\"hostname\":\"jb2\",\"stage\":0,\"delay\":30}}"}}"

The VM Mac Address from template is static, but when cloning I am trying to force the cloned VM to get a dynamic Mac and then assign the NSX-T static IP to it using the new Mac Address assigned to the cloned VM to be able to assign a defined static IP as per the array.

rubinthomas commented 8 months ago

Hi @annakhm

It does work but I'm not sure what is the exact cause that this bug comes up with. Perhaps due to making the template mac address to set to "automatic" in vcenter/vsphere for vm template as opposed to manual. OR setting the mac_address = "" for use_static_mac = false condition.

Anyways my code does work with

use_static_mac = false
mac_address = ""

But since it was requested I posted what I got from the terraform commands here:

nsxt_policy_ip_address_allocation.nat_ip: Creating...
nsxt_policy_dhcp_server.segment_dhcp: Creating...
vsphere_folder.folder: Creating...
vsphere_resource_pool.child_pool: Creating...
time_sleep.wait_x_seconds_stage0["SRH9XG_SRV3"]: Creating...
nsxt_policy_tier1_gateway.T1: Creating...
nsxt_policy_dhcp_server.segment_dhcp: Creation complete after 1s [id=IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt]
vsphere_resource_pool.child_pool: Creation complete after 1s [id=resgroup-97194]
nsxt_policy_tier1_gateway.T1: Creation complete after 1s [id=IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt]
nsxt_policy_gateway_policy.Default_fw_policy: Creating...
nsxt_policy_gateway_policy.DNS_policy: Creating...
nsxt_policy_gateway_policy.ICMP_policy: Creating...
nsxt_policy_gateway_policy.OUTGOING_policy: Creating...
nsxt_policy_segment.seg: Creating...
nsxt_policy_gateway_policy.WEB_policy: Creating...
nsxt_policy_gateway_policy.Default_fw_policy: Creation complete after 1s [id=f3e7cf90-3335-447c-b811-a36f2f0e090d]
nsxt_policy_gateway_policy.OUTGOING_policy: Creation complete after 1s [id=b3a08957-e527-4c65-aa5b-78785db9a8aa]
nsxt_policy_gateway_policy.DNS_policy: Creation complete after 1s [id=7030bd97-8a8e-4d78-bf75-10de88069987]
nsxt_policy_gateway_policy.ICMP_policy: Creation complete after 1s [id=1e87e513-7059-42ce-b8d2-0745d504b956]
nsxt_policy_gateway_policy.WEB_policy: Creation complete after 1s [id=f6e11e03-8724-4e82-b1a2-0e23d61f7462]
nsxt_policy_ip_address_allocation.nat_ip: Creation complete after 2s [id=d9a15dac-1b84-4e22-b27a-4e5c0583662d]
nsxt_policy_nat_rule.T1_SNAT_Rule: Creating...
vsphere_folder.folder: Creation complete after 2s [id=group-v97195]
nsxt_policy_segment.seg: Creation complete after 1s [id=IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt]
data.nsxt_policy_segment_realization.seg: Reading...
null_resource.clean_folder: Creating...
time_sleep.wait_10_seconds: Creating...
null_resource.clean_folder: Creation complete after 0s [id=6017763589623890964]
nsxt_policy_nat_rule.T1_SNAT_Rule: Creation complete after 0s [id=IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt]
time_sleep.wait_x_seconds_stage0["SRH9XG_SRV3"]: Still creating... [10s elapsed]
data.nsxt_policy_segment_realization.seg: Read complete after 10s [id=fdf54715-936b-4d76-9b61-d048f03588de]
time_sleep.wait_10_seconds: Still creating... [10s elapsed]
time_sleep.wait_10_seconds: Creation complete after 10s [id=2024-03-13T02:31:37Z]
data.vsphere_network.vm_net: Reading...
data.vsphere_network.vm_net: Read complete after 2s [id=dvportgroup-97197]
time_sleep.wait_x_seconds_stage0["SRH9XG_SRV3"]: Still creating... [20s elapsed]
time_sleep.wait_x_seconds_stage0["SRH9XG_SRV3"]: Still creating... [30s elapsed]
time_sleep.wait_x_seconds_stage0["SRH9XG_SRV3"]: Creation complete after 30s [id=2024-03-13T02:31:54Z]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Creating...
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Still creating... [10s elapsed]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Still creating... [20s elapsed]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Still creating... [30s elapsed]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Still creating... [40s elapsed]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Still creating... [50s elapsed]
vsphere_virtual_machine.stage0["SRH9XG_SRV3"]: Creation complete after 52s [id=4237ce1a-148f-3041-aa20-3b04a097ba08]
time_sleep.wait_x_seconds_stage2["SRH9XG_JB1"]: Creating...
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0["SRH9XG_SRV3"]: Creating...
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0["SRH9XG_SRV3"]: Creation complete after 1s [id=5894acda-7062-4e4c-97e8-f4027cc9e5ec]
time_sleep.wait_x_seconds_stage2["SRH9XG_JB1"]: Still creating... [10s elapsed]
time_sleep.wait_x_seconds_stage2["SRH9XG_JB1"]: Still creating... [20s elapsed]
time_sleep.wait_x_seconds_stage2["SRH9XG_JB1"]: Creation complete after 30s [id=2024-03-13T02:33:17Z]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Creating...
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Still creating... [10s elapsed]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Still creating... [20s elapsed]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Still creating... [30s elapsed]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Still creating... [40s elapsed]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Still creating... [50s elapsed]
vsphere_virtual_machine.stage2["SRH9XG_JB1"]: Creation complete after 50s [id=423758fc-1cea-63b2-eff0-4fabc7a3eb30]
time_sleep.wait_x_seconds_stage3["SRH9XG_JB2"]: Creating...
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2["SRH9XG_JB1"]: Creating...
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2["SRH9XG_JB1"]: Creation complete after 1s [id=4ec8a2ac-679b-48eb-8353-292ef95be001]
time_sleep.wait_x_seconds_stage3["SRH9XG_JB2"]: Still creating... [10s elapsed]
time_sleep.wait_x_seconds_stage3["SRH9XG_JB2"]: Still creating... [20s elapsed]
time_sleep.wait_x_seconds_stage3["SRH9XG_JB2"]: Still creating... [30s elapsed]
time_sleep.wait_x_seconds_stage3["SRH9XG_JB2"]: Creation complete after 30s [id=2024-03-13T02:34:39Z]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Creating...
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Still creating... [10s elapsed]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Still creating... [20s elapsed]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Still creating... [30s elapsed]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Still creating... [40s elapsed]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Still creating... [50s elapsed]
vsphere_virtual_machine.stage3["SRH9XG_JB2"]: Creation complete after 51s [id=4237df57-1093-26e7-17eb-edbf9f5dde4f]
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3["SRH9XG_JB2"]: Creating...
nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3["SRH9XG_JB2"]: Creation complete after 1s [id=0780f486-d8c5-4148-a39f-b561ee7cf65a]

Apply complete! Resources: 23 added, 0 changed, 0 destroyed.

Outputs:

vm_table = [
  {
    "folder" = "itz-ws-na/TERRAFORM/IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt_000"
    "mac" = "00:50:56:b7:b7:14"
    "memory" = "16 GB"
    "moid" = "vm-97199"
    "name" = "RUBIN_SRH9XG_JB1"
    "network" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "num_cpus" = "8 vCPUs"
    "resource_pool" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "uuid" = "423758fc-1cea-63b2-eff0-4fabc7a3eb30"
  },
  {
    "folder" = "itz-ws-na/TERRAFORM/IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt_000"
    "mac" = "00:50:56:b7:93:06"
    "memory" = "16 GB"
    "moid" = "vm-97200"
    "name" = "RUBIN_SRH9XG_JB2"
    "network" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "num_cpus" = "8 vCPUs"
    "resource_pool" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "uuid" = "4237df57-1093-26e7-17eb-edbf9f5dde4f"
  },
  {
    "folder" = "itz-ws-na/TERRAFORM/IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt_000"
    "mac" = "00:50:56:b7:89:ab"
    "memory" = "16 GB"
    "moid" = "vm-97198"
    "name" = "RUBIN_SRH9XG_SRV3"
    "network" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "num_cpus" = "8 vCPUs"
    "resource_pool" = "IRLP_DEV_SRH9XG_RUBIN_2020rt2021rt2022rt2023rt"
    "uuid" = "4237ce1a-148f-3041-aa20-3b04a097ba08"
  },
]

MacBook-Pro test % terraform graph

digraph {
        compound = "true"
        newrank = "true"
        subgraph "root" {
                "[root] data.external.datastore (expand)" [label = "data.external.datastore", shape = "box"]
                "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)" [label = "data.nsxt_policy_edge_cluster.T0_EC", shape = "box"]
                "[root] data.nsxt_policy_edge_node.edge_node_1 (expand)" [label = "data.nsxt_policy_edge_node.edge_node_1", shape = "box"]
                "[root] data.nsxt_policy_edge_node.edge_node_2 (expand)" [label = "data.nsxt_policy_edge_node.edge_node_2", shape = "box"]
                "[root] data.nsxt_policy_ip_discovery_profile.ip_dis_prof (expand)" [label = "data.nsxt_policy_ip_discovery_profile.ip_dis_prof", shape = "box"]
                "[root] data.nsxt_policy_ip_pool.nat_pool (expand)" [label = "data.nsxt_policy_ip_pool.nat_pool", shape = "box"]
                "[root] data.nsxt_policy_mac_discovery_profile.mac_dis_prof (expand)" [label = "data.nsxt_policy_mac_discovery_profile.mac_dis_prof", shape = "box"]
                "[root] data.nsxt_policy_segment_realization.seg (expand)" [label = "data.nsxt_policy_segment_realization.seg", shape = "box"]
                "[root] data.nsxt_policy_segment_security_profile.sec_prof (expand)" [label = "data.nsxt_policy_segment_security_profile.sec_prof", shape = "box"]
                "[root] data.nsxt_policy_spoofguard_profile.spoofg_prof (expand)" [label = "data.nsxt_policy_spoofguard_profile.spoofg_prof", shape = "box"]
                "[root] data.nsxt_policy_tier0_gateway.T0 (expand)" [label = "data.nsxt_policy_tier0_gateway.T0", shape = "box"]
                "[root] data.nsxt_policy_transport_zone.vm_overlay (expand)" [label = "data.nsxt_policy_transport_zone.vm_overlay", shape = "box"]
                "[root] data.vsphere_compute_cluster.compute_cluster (expand)" [label = "data.vsphere_compute_cluster.compute_cluster", shape = "box"]
                "[root] data.vsphere_datacenter.dc (expand)" [label = "data.vsphere_datacenter.dc", shape = "box"]
                "[root] data.vsphere_datastore.datastore_vm (expand)" [label = "data.vsphere_datastore.datastore_vm", shape = "box"]
                "[root] data.vsphere_distributed_virtual_switch.vds (expand)" [label = "data.vsphere_distributed_virtual_switch.vds", shape = "box"]
                "[root] data.vsphere_folder.root_folder (expand)" [label = "data.vsphere_folder.root_folder", shape = "box"]
                "[root] data.vsphere_network.vm_net (expand)" [label = "data.vsphere_network.vm_net", shape = "box"]
                "[root] data.vsphere_resource_pool.root_pool (expand)" [label = "data.vsphere_resource_pool.root_pool", shape = "box"]
                "[root] data.vsphere_virtual_machine.vm_template (expand)" [label = "data.vsphere_virtual_machine.vm_template", shape = "box"]
                "[root] nsxt_policy_dhcp_server.segment_dhcp (expand)" [label = "nsxt_policy_dhcp_server.segment_dhcp", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage1 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage1", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage4 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage4", shape = "box"]
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage5 (expand)" [label = "nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage5", shape = "box"]
                "[root] nsxt_policy_gateway_policy.DNS_policy (expand)" [label = "nsxt_policy_gateway_policy.DNS_policy", shape = "box"]
                "[root] nsxt_policy_gateway_policy.Default_fw_policy (expand)" [label = "nsxt_policy_gateway_policy.Default_fw_policy", shape = "box"]
                "[root] nsxt_policy_gateway_policy.ICMP_policy (expand)" [label = "nsxt_policy_gateway_policy.ICMP_policy", shape = "box"]
                "[root] nsxt_policy_gateway_policy.OUTGOING_policy (expand)" [label = "nsxt_policy_gateway_policy.OUTGOING_policy", shape = "box"]
                "[root] nsxt_policy_gateway_policy.WEB_policy (expand)" [label = "nsxt_policy_gateway_policy.WEB_policy", shape = "box"]
                "[root] nsxt_policy_ip_address_allocation.nat_ip (expand)" [label = "nsxt_policy_ip_address_allocation.nat_ip", shape = "box"]
                "[root] nsxt_policy_nat_rule.T1_SNAT_Rule (expand)" [label = "nsxt_policy_nat_rule.T1_SNAT_Rule", shape = "box"]
                "[root] nsxt_policy_segment.seg (expand)" [label = "nsxt_policy_segment.seg", shape = "box"]
                "[root] nsxt_policy_tier1_gateway.T1 (expand)" [label = "nsxt_policy_tier1_gateway.T1", shape = "box"]
                "[root] null_resource.clean_folder (expand)" [label = "null_resource.clean_folder", shape = "box"]
                "[root] provider[\"registry.terraform.io/hashicorp/external\"]" [label = "provider[\"registry.terraform.io/hashicorp/external\"]", shape = "diamond"]
                "[root] provider[\"registry.terraform.io/hashicorp/null\"]" [label = "provider[\"registry.terraform.io/hashicorp/null\"]", shape = "diamond"]
                "[root] provider[\"registry.terraform.io/hashicorp/time\"]" [label = "provider[\"registry.terraform.io/hashicorp/time\"]", shape = "diamond"]
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]" [label = "provider[\"registry.terraform.io/hashicorp/vsphere\"]", shape = "diamond"]
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"]" [label = "provider[\"registry.terraform.io/vmware/nsxt\"]", shape = "diamond"]
                "[root] time_sleep.wait_10_seconds (expand)" [label = "time_sleep.wait_10_seconds", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage0 (expand)" [label = "time_sleep.wait_x_seconds_stage0", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage1 (expand)" [label = "time_sleep.wait_x_seconds_stage1", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage2 (expand)" [label = "time_sleep.wait_x_seconds_stage2", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage3 (expand)" [label = "time_sleep.wait_x_seconds_stage3", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage4 (expand)" [label = "time_sleep.wait_x_seconds_stage4", shape = "box"]
                "[root] time_sleep.wait_x_seconds_stage5 (expand)" [label = "time_sleep.wait_x_seconds_stage5", shape = "box"]
                "[root] var.T1_DNAT_net" [label = "var.T1_DNAT_net", shape = "note"]
                "[root] var.T1_source_net" [label = "var.T1_source_net", shape = "note"]
                "[root] var.ad_domain" [label = "var.ad_domain", shape = "note"]
                "[root] var.ad_hostname" [label = "var.ad_hostname", shape = "note"]
                "[root] var.ad_password" [label = "var.ad_password", shape = "note"]
                "[root] var.ad_user_dn" [label = "var.ad_user_dn", shape = "note"]
                "[root] var.ad_username" [label = "var.ad_username", shape = "note"]
                "[root] var.className" [label = "var.className", shape = "note"]
                "[root] var.cloud_provider" [label = "var.cloud_provider", shape = "note"]
                "[root] var.cloud_type" [label = "var.cloud_type", shape = "note"]
                "[root] var.concMax" [label = "var.concMax", shape = "note"]
                "[root] var.courseCode" [label = "var.courseCode", shape = "note"]
                "[root] var.datacenter" [label = "var.datacenter", shape = "note"]
                "[root] var.deploy_folder" [label = "var.deploy_folder", shape = "note"]
                "[root] var.edge_node_1" [label = "var.edge_node_1", shape = "note"]
                "[root] var.edge_node_2" [label = "var.edge_node_2", shape = "note"]
                "[root] var.envNum" [label = "var.envNum", shape = "note"]
                "[root] var.esxi_storage_subnet" [label = "var.esxi_storage_subnet", shape = "note"]
                "[root] var.event" [label = "var.event", shape = "note"]
                "[root] var.iaas_classic_api_key" [label = "var.iaas_classic_api_key", shape = "note"]
                "[root] var.iaas_classic_username" [label = "var.iaas_classic_username", shape = "note"]
                "[root] var.ibmcloud_api_key" [label = "var.ibmcloud_api_key", shape = "note"]
                "[root] var.linked_clone" [label = "var.linked_clone", shape = "note"]
                "[root] var.network_segment_prefix" [label = "var.network_segment_prefix", shape = "note"]
                "[root] var.nsxt_dhcp" [label = "var.nsxt_dhcp", shape = "note"]
                "[root] var.nsxt_dns" [label = "var.nsxt_dns", shape = "note"]
                "[root] var.nsxt_local_domain" [label = "var.nsxt_local_domain", shape = "note"]
                "[root] var.nsxt_manager_host" [label = "var.nsxt_manager_host", shape = "note"]
                "[root] var.nsxt_password" [label = "var.nsxt_password", shape = "note"]
                "[root] var.nsxt_promiscuous_mode" [label = "var.nsxt_promiscuous_mode", shape = "note"]
                "[root] var.nsxt_subnet_cidr" [label = "var.nsxt_subnet_cidr", shape = "note"]
                "[root] var.nsxt_subnet_range" [label = "var.nsxt_subnet_range", shape = "note"]
                "[root] var.nsxt_subnet_server_address" [label = "var.nsxt_subnet_server_address", shape = "note"]
                "[root] var.nsxt_username" [label = "var.nsxt_username", shape = "note"]
                "[root] var.parentReservationId" [label = "var.parentReservationId", shape = "note"]
                "[root] var.preexisting_infra" [label = "var.preexisting_infra", shape = "note"]
                "[root] var.requestId" [label = "var.requestId", shape = "note"]
                "[root] var.reservationId" [label = "var.reservationId", shape = "note"]
                "[root] var.root_template_folder" [label = "var.root_template_folder", shape = "note"]
                "[root] var.root_terraform" [label = "var.root_terraform", shape = "note"]
                "[root] var.shared_datastore" [label = "var.shared_datastore", shape = "note"]
                "[root] var.stdNum" [label = "var.stdNum", shape = "note"]
                "[root] var.svc_cluster" [label = "var.svc_cluster", shape = "note"]
                "[root] var.svc_hostname" [label = "var.svc_hostname", shape = "note"]
                "[root] var.svc_token" [label = "var.svc_token", shape = "note"]
                "[root] var.templateCode" [label = "var.templateCode", shape = "note"]
                "[root] var.template_folder" [label = "var.template_folder", shape = "note"]
                "[root] var.ui_deploy_type" [label = "var.ui_deploy_type", shape = "note"]
                "[root] var.usageCategory" [label = "var.usageCategory", shape = "note"]
                "[root] var.user_email" [label = "var.user_email", shape = "note"]
                "[root] var.user_id" [label = "var.user_id", shape = "note"]
                "[root] var.vms_map" [label = "var.vms_map", shape = "note"]
                "[root] var.vsphere_cluster" [label = "var.vsphere_cluster", shape = "note"]
                "[root] var.vsphere_datacenter" [label = "var.vsphere_datacenter", shape = "note"]
                "[root] var.vsphere_host_prefix" [label = "var.vsphere_host_prefix", shape = "note"]
                "[root] var.vsphere_hostname" [label = "var.vsphere_hostname", shape = "note"]
                "[root] var.vsphere_nested_hv_enabled" [label = "var.vsphere_nested_hv_enabled", shape = "note"]
                "[root] var.vsphere_password" [label = "var.vsphere_password", shape = "note"]
                "[root] var.vsphere_server" [label = "var.vsphere_server", shape = "note"]
                "[root] var.vsphere_user" [label = "var.vsphere_user", shape = "note"]
                "[root] var.vsphere_vm_count" [label = "var.vsphere_vm_count", shape = "note"]
                "[root] vsphere_folder.folder (expand)" [label = "vsphere_folder.folder", shape = "box"]
                "[root] vsphere_resource_pool.child_pool (expand)" [label = "vsphere_resource_pool.child_pool", shape = "box"]
                "[root] vsphere_virtual_machine.stage0 (expand)" [label = "vsphere_virtual_machine.stage0", shape = "box"]
                "[root] vsphere_virtual_machine.stage1 (expand)" [label = "vsphere_virtual_machine.stage1", shape = "box"]
                "[root] vsphere_virtual_machine.stage2 (expand)" [label = "vsphere_virtual_machine.stage2", shape = "box"]
                "[root] vsphere_virtual_machine.stage3 (expand)" [label = "vsphere_virtual_machine.stage3", shape = "box"]
                "[root] vsphere_virtual_machine.stage4 (expand)" [label = "vsphere_virtual_machine.stage4", shape = "box"]
                "[root] vsphere_virtual_machine.stage5 (expand)" [label = "vsphere_virtual_machine.stage5", shape = "box"]
                "[root] data.external.datastore (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/external\"]"
                "[root] data.external.datastore (expand)" -> "[root] var.shared_datastore"
                "[root] data.external.datastore (expand)" -> "[root] var.vsphere_password"
                "[root] data.external.datastore (expand)" -> "[root] var.vsphere_server"
                "[root] data.external.datastore (expand)" -> "[root] var.vsphere_user"
                "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)" -> "[root] var.network_segment_prefix"
                "[root] data.nsxt_policy_edge_node.edge_node_1 (expand)" -> "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)"
                "[root] data.nsxt_policy_edge_node.edge_node_1 (expand)" -> "[root] var.edge_node_1"
                "[root] data.nsxt_policy_edge_node.edge_node_2 (expand)" -> "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)"
                "[root] data.nsxt_policy_edge_node.edge_node_2 (expand)" -> "[root] var.edge_node_2"
                "[root] data.nsxt_policy_ip_discovery_profile.ip_dis_prof (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_ip_pool.nat_pool (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_mac_discovery_profile.mac_dis_prof (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_mac_discovery_profile.mac_dis_prof (expand)" -> "[root] var.nsxt_promiscuous_mode"
                "[root] data.nsxt_policy_segment_realization.seg (expand)" -> "[root] nsxt_policy_segment.seg (expand)"
                "[root] data.nsxt_policy_segment_security_profile.sec_prof (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_spoofguard_profile.spoofg_prof (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_tier0_gateway.T0 (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_tier0_gateway.T0 (expand)" -> "[root] var.network_segment_prefix"
                "[root] data.nsxt_policy_transport_zone.vm_overlay (expand)" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"]"
                "[root] data.nsxt_policy_transport_zone.vm_overlay (expand)" -> "[root] var.network_segment_prefix"
                "[root] data.vsphere_compute_cluster.compute_cluster (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] data.vsphere_compute_cluster.compute_cluster (expand)" -> "[root] var.vsphere_cluster"
                "[root] data.vsphere_datacenter.dc (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]"
                "[root] data.vsphere_datacenter.dc (expand)" -> "[root] var.vsphere_datacenter"
                "[root] data.vsphere_datastore.datastore_vm (expand)" -> "[root] data.external.datastore (expand)"
                "[root] data.vsphere_datastore.datastore_vm (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] data.vsphere_distributed_virtual_switch.vds (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] data.vsphere_distributed_virtual_switch.vds (expand)" -> "[root] var.network_segment_prefix"
                "[root] data.vsphere_distributed_virtual_switch.vds (expand)" -> "[root] var.vsphere_cluster"
                "[root] data.vsphere_folder.root_folder (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]"
                "[root] data.vsphere_folder.root_folder (expand)" -> "[root] var.root_terraform"
                "[root] data.vsphere_folder.root_folder (expand)" -> "[root] var.vsphere_cluster"
                "[root] data.vsphere_folder.root_folder (expand)" -> "[root] var.vsphere_datacenter"
                "[root] data.vsphere_network.vm_net (expand)" -> "[root] data.nsxt_policy_segment_realization.seg (expand)"
                "[root] data.vsphere_network.vm_net (expand)" -> "[root] data.vsphere_distributed_virtual_switch.vds (expand)"
                "[root] data.vsphere_network.vm_net (expand)" -> "[root] time_sleep.wait_10_seconds (expand)"
                "[root] data.vsphere_resource_pool.root_pool (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] data.vsphere_resource_pool.root_pool (expand)" -> "[root] var.root_terraform"
                "[root] data.vsphere_resource_pool.root_pool (expand)" -> "[root] var.vsphere_cluster"
                "[root] data.vsphere_virtual_machine.vm_template (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] data.vsphere_virtual_machine.vm_template (expand)" -> "[root] local.vm_map (expand)"
                "[root] data.vsphere_virtual_machine.vm_template (expand)" -> "[root] local.vsphere_template (expand)"
                "[root] local.cidr_parts (expand)" -> "[root] local.nsxt_subnet_cidr (expand)"
                "[root] local.class (expand)" -> "[root] var.className"
                "[root] local.class_n (expand)" -> "[root] local.class (expand)"
                "[root] local.class_n (expand)" -> "[root] local.class_type (expand)"
                "[root] local.class_num (expand)" -> "[root] local.class_n (expand)"
                "[root] local.class_type (expand)" -> "[root] local.deploy (expand)"
                "[root] local.class_type (expand)" -> "[root] local.event_name (expand)"
                "[root] local.course_code (expand)" -> "[root] var.courseCode"
                "[root] local.deploy (expand)" -> "[root] var.deploy_folder"
                "[root] local.env_access (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] local.envnum (expand)" -> "[root] local.student_num (expand)"
                "[root] local.envnum (expand)" -> "[root] var.envNum"
                "[root] local.event_name (expand)" -> "[root] var.event"
                "[root] local.fname (expand)" -> "[root] local.envnum (expand)"
                "[root] local.fname (expand)" -> "[root] local.root_name (expand)"
                "[root] local.host_bits (expand)" -> "[root] local.cidr_parts (expand)"
                "[root] local.last_host (expand)" -> "[root] local.max_hosts (expand)"
                "[root] local.max_hosts (expand)" -> "[root] local.host_bits (expand)"
                "[root] local.nsxt_dhcp_range (expand)" -> "[root] local.last_host (expand)"
                "[root] local.nsxt_dhcp_range (expand)" -> "[root] local.ranges (expand)"
                "[root] local.nsxt_dhcp_range (expand)" -> "[root] var.nsxt_dhcp"
                "[root] local.nsxt_dhcp_ranges (expand)" -> "[root] local.nsxt_dhcp_range (expand)"
                "[root] local.nsxt_dhcp_ranges (expand)" -> "[root] local.start_host (expand)"
                "[root] local.nsxt_dhcp_sa (expand)" -> "[root] local.max_hosts (expand)"
                "[root] local.nsxt_dhcp_sa (expand)" -> "[root] var.nsxt_subnet_server_address"
                "[root] local.nsxt_dns_ip (expand)" -> "[root] local.last_host (expand)"
                "[root] local.nsxt_dns_ip (expand)" -> "[root] var.nsxt_dns"
                "[root] local.nsxt_dns_l (expand)" -> "[root] var.ad_hostname"
                "[root] local.nsxt_dns_l (expand)" -> "[root] var.nsxt_dns"
                "[root] local.nsxt_dns_servers (expand)" -> "[root] local.nsxt_dns_l (expand)"
                "[root] local.nsxt_dns_servers (expand)" -> "[root] var.nsxt_dhcp"
                "[root] local.nsxt_prefix (expand)" -> "[root] local.root_name (expand)"
                "[root] local.nsxt_subnet_cidr (expand)" -> "[root] var.nsxt_subnet_cidr"
                "[root] local.parentReservationId (expand)" -> "[root] var.parentReservationId"
                "[root] local.parentReservationId (expand)" -> "[root] var.reservationId"
                "[root] local.ranges (expand)" -> "[root] var.nsxt_subnet_range"
                "[root] local.root_name (expand)" -> "[root] local.class (expand)"
                "[root] local.root_name (expand)" -> "[root] local.course_code (expand)"
                "[root] local.root_name (expand)" -> "[root] local.deploy (expand)"
                "[root] local.root_name (expand)" -> "[root] local.event_name (expand)"
                "[root] local.root_name (expand)" -> "[root] local.parentReservationId (expand)"
                "[root] local.stage0 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.stage1 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.stage2 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.stage3 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.stage4 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.stage5 (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.start_host (expand)" -> "[root] local.vm_count (expand)"
                "[root] local.stdnum (expand)" -> "[root] local.stdnum_max (expand)"
                "[root] local.stdnum (expand)" -> "[root] local.stdnum_val (expand)"
                "[root] local.stdnum_max (expand)" -> "[root] var.concMax"
                "[root] local.stdnum_val (expand)" -> "[root] var.stdNum"
                "[root] local.student_num (expand)" -> "[root] local.class_n (expand)"
                "[root] local.template_code (expand)" -> "[root] local.course_code (expand)"
                "[root] local.template_code (expand)" -> "[root] var.templateCode"
                "[root] local.template_folder (expand)" -> "[root] var.template_folder"
                "[root] local.ui_deploy_fname (expand)" -> "[root] local.fname (expand)"
                "[root] local.ui_deploy_rname (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] local.ui_deploy_vappname (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] local.urlExtension (expand)" -> "[root] local.urlclassNum (expand)"
                "[root] local.urlExtension (expand)" -> "[root] local.urlstudentNum (expand)"
                "[root] local.urlExtension (expand)" -> "[root] local.urltype (expand)"
                "[root] local.urlclassNum (expand)" -> "[root] local.class_num (expand)"
                "[root] local.urlstudentNum (expand)" -> "[root] local.student_num (expand)"
                "[root] local.urltype (expand)" -> "[root] local.class_type (expand)"
                "[root] local.vm_count (expand)" -> "[root] local.vm_map (expand)"
                "[root] local.vm_list (expand)" -> "[root] vsphere_virtual_machine.stage5 (expand)"
                "[root] local.vm_map (expand)" -> "[root] var.vms_map"
                "[root] local.vsphere_template (expand)" -> "[root] local.template_code (expand)"
                "[root] local.vsphere_template (expand)" -> "[root] local.template_folder (expand)"
                "[root] local.vsphere_template (expand)" -> "[root] var.root_template_folder"
                "[root] local.vsphere_template (expand)" -> "[root] var.vsphere_cluster"
                "[root] nsxt_policy_dhcp_server.segment_dhcp (expand)" -> "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)"
                "[root] nsxt_policy_dhcp_server.segment_dhcp (expand)" -> "[root] local.nsxt_dhcp_sa (expand)"
                "[root] nsxt_policy_dhcp_server.segment_dhcp (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0 (expand)" -> "[root] vsphere_virtual_machine.stage0 (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage1 (expand)" -> "[root] vsphere_virtual_machine.stage1 (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2 (expand)" -> "[root] vsphere_virtual_machine.stage2 (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3 (expand)" -> "[root] vsphere_virtual_machine.stage3 (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage4 (expand)" -> "[root] vsphere_virtual_machine.stage4 (expand)"
                "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage5 (expand)" -> "[root] vsphere_virtual_machine.stage5 (expand)"
                "[root] nsxt_policy_gateway_policy.DNS_policy (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_gateway_policy.Default_fw_policy (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_gateway_policy.ICMP_policy (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_gateway_policy.OUTGOING_policy (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_gateway_policy.WEB_policy (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_ip_address_allocation.nat_ip (expand)" -> "[root] data.nsxt_policy_ip_pool.nat_pool (expand)"
                "[root] nsxt_policy_ip_address_allocation.nat_ip (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] nsxt_policy_nat_rule.T1_SNAT_Rule (expand)" -> "[root] nsxt_policy_ip_address_allocation.nat_ip (expand)"
                "[root] nsxt_policy_nat_rule.T1_SNAT_Rule (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] data.nsxt_policy_ip_discovery_profile.ip_dis_prof (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] data.nsxt_policy_mac_discovery_profile.mac_dis_prof (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] data.nsxt_policy_segment_security_profile.sec_prof (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] data.nsxt_policy_spoofguard_profile.spoofg_prof (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] data.nsxt_policy_transport_zone.vm_overlay (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] local.nsxt_dhcp_ranges (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] local.nsxt_dns_servers (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] nsxt_policy_dhcp_server.segment_dhcp (expand)"
                "[root] nsxt_policy_segment.seg (expand)" -> "[root] nsxt_policy_tier1_gateway.T1 (expand)"
                "[root] nsxt_policy_tier1_gateway.T1 (expand)" -> "[root] data.nsxt_policy_edge_cluster.T0_EC (expand)"
                "[root] nsxt_policy_tier1_gateway.T1 (expand)" -> "[root] data.nsxt_policy_tier0_gateway.T0 (expand)"
                "[root] nsxt_policy_tier1_gateway.T1 (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] null_resource.clean_folder (expand)" -> "[root] local.fname (expand)"
                "[root] null_resource.clean_folder (expand)" -> "[root] nsxt_policy_segment.seg (expand)"
                "[root] null_resource.clean_folder (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
                "[root] null_resource.clean_folder (expand)" -> "[root] vsphere_folder.folder (expand)"
                "[root] output.vm_table (expand)" -> "[root] local.vm_list (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/external\"] (close)" -> "[root] data.external.datastore (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.clean_folder (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/time\"] (close)" -> "[root] time_sleep.wait_x_seconds_stage5 (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"] (close)" -> "[root] data.vsphere_compute_cluster.compute_cluster (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"] (close)" -> "[root] vsphere_virtual_machine.stage5 (expand)"
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]" -> "[root] var.vsphere_password"
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]" -> "[root] var.vsphere_server"
                "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"]" -> "[root] var.vsphere_user"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] data.nsxt_policy_edge_node.edge_node_1 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] data.nsxt_policy_edge_node.edge_node_2 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage1 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage2 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage3 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage4 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage5 (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_gateway_policy.DNS_policy (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_gateway_policy.Default_fw_policy (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_gateway_policy.ICMP_policy (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_gateway_policy.OUTGOING_policy (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_gateway_policy.WEB_policy (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)" -> "[root] nsxt_policy_nat_rule.T1_SNAT_Rule (expand)"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"]" -> "[root] var.nsxt_manager_host"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"]" -> "[root] var.nsxt_password"
                "[root] provider[\"registry.terraform.io/vmware/nsxt\"]" -> "[root] var.nsxt_username"
                "[root] root" -> "[root] local.env_access (expand)"
                "[root] root" -> "[root] local.nsxt_dns_ip (expand)"
                "[root] root" -> "[root] local.stdnum (expand)"
                "[root] root" -> "[root] local.ui_deploy_fname (expand)"
                "[root] root" -> "[root] local.ui_deploy_fold (expand)"
                "[root] root" -> "[root] local.ui_deploy_resp (expand)"
                "[root] root" -> "[root] local.ui_deploy_rname (expand)"
                "[root] root" -> "[root] local.ui_deploy_vapp (expand)"
                "[root] root" -> "[root] local.ui_deploy_vappname (expand)"
                "[root] root" -> "[root] local.ui_deploy_vm (expand)"
                "[root] root" -> "[root] local.urlExtension (expand)"
                "[root] root" -> "[root] output.vm_table (expand)"
                "[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/external\"] (close)"
                "[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
                "[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/time\"] (close)"
                "[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/vsphere\"] (close)"
                "[root] root" -> "[root] provider[\"registry.terraform.io/vmware/nsxt\"] (close)"
                "[root] root" -> "[root] var.T1_DNAT_net"
                "[root] root" -> "[root] var.T1_source_net"
                "[root] root" -> "[root] var.ad_domain"
                "[root] root" -> "[root] var.ad_password"
                "[root] root" -> "[root] var.ad_user_dn"
                "[root] root" -> "[root] var.ad_username"
                "[root] root" -> "[root] var.cloud_provider"
                "[root] root" -> "[root] var.cloud_type"
                "[root] root" -> "[root] var.datacenter"
                "[root] root" -> "[root] var.esxi_storage_subnet"
                "[root] root" -> "[root] var.iaas_classic_api_key"
                "[root] root" -> "[root] var.iaas_classic_username"
                "[root] root" -> "[root] var.ibmcloud_api_key"
                "[root] root" -> "[root] var.nsxt_local_domain"
                "[root] root" -> "[root] var.preexisting_infra"
                "[root] root" -> "[root] var.requestId"
                "[root] root" -> "[root] var.svc_cluster"
                "[root] root" -> "[root] var.svc_hostname"
                "[root] root" -> "[root] var.svc_token"
                "[root] root" -> "[root] var.ui_deploy_type"
                "[root] root" -> "[root] var.usageCategory"
                "[root] root" -> "[root] var.user_email"
                "[root] root" -> "[root] var.user_id"
                "[root] root" -> "[root] var.vsphere_host_prefix"
                "[root] root" -> "[root] var.vsphere_hostname"
                "[root] root" -> "[root] var.vsphere_nested_hv_enabled"
                "[root] root" -> "[root] var.vsphere_vm_count"
                "[root] time_sleep.wait_10_seconds (expand)" -> "[root] nsxt_policy_segment.seg (expand)"
                "[root] time_sleep.wait_10_seconds (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/time\"]"
                "[root] time_sleep.wait_x_seconds_stage0 (expand)" -> "[root] data.vsphere_virtual_machine.vm_template (expand)"
                "[root] time_sleep.wait_x_seconds_stage0 (expand)" -> "[root] local.stage0 (expand)"
                "[root] time_sleep.wait_x_seconds_stage0 (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/time\"]"
                "[root] time_sleep.wait_x_seconds_stage1 (expand)" -> "[root] local.stage1 (expand)"
                "[root] time_sleep.wait_x_seconds_stage1 (expand)" -> "[root] vsphere_virtual_machine.stage0 (expand)"
                "[root] time_sleep.wait_x_seconds_stage2 (expand)" -> "[root] local.stage2 (expand)"
                "[root] time_sleep.wait_x_seconds_stage2 (expand)" -> "[root] vsphere_virtual_machine.stage1 (expand)"
                "[root] time_sleep.wait_x_seconds_stage3 (expand)" -> "[root] local.stage3 (expand)"
                "[root] time_sleep.wait_x_seconds_stage3 (expand)" -> "[root] vsphere_virtual_machine.stage2 (expand)"
                "[root] time_sleep.wait_x_seconds_stage4 (expand)" -> "[root] local.stage4 (expand)"
                "[root] time_sleep.wait_x_seconds_stage4 (expand)" -> "[root] vsphere_virtual_machine.stage3 (expand)"
                "[root] time_sleep.wait_x_seconds_stage5 (expand)" -> "[root] local.stage5 (expand)"
                "[root] time_sleep.wait_x_seconds_stage5 (expand)" -> "[root] vsphere_virtual_machine.stage4 (expand)"
                "[root] vsphere_folder.folder (expand)" -> "[root] data.vsphere_datacenter.dc (expand)"
                "[root] vsphere_folder.folder (expand)" -> "[root] data.vsphere_folder.root_folder (expand)"
                "[root] vsphere_folder.folder (expand)" -> "[root] local.envnum (expand)"
                "[root] vsphere_folder.folder (expand)" -> "[root] local.root_name (expand)"
                "[root] vsphere_resource_pool.child_pool (expand)" -> "[root] data.vsphere_resource_pool.root_pool (expand)"
                "[root] vsphere_resource_pool.child_pool (expand)" -> "[root] local.nsxt_prefix (expand)"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] data.vsphere_datastore.datastore_vm (expand)"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] data.vsphere_network.vm_net (expand)"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] null_resource.clean_folder (expand)"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] time_sleep.wait_x_seconds_stage0 (expand)"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] var.linked_clone"
                "[root] vsphere_virtual_machine.stage0 (expand)" -> "[root] vsphere_resource_pool.child_pool (expand)"
        }
}