Giter VIP home page Giter VIP logo

Comments (2)

msyretis avatar msyretis commented on September 15, 2024

Hello,

I am facing exactly the same issue, but on a host transport node, an esxi host, prepared for nsx can have more than on VDSs prepared. I dont seem to be able to add a second one in the nsxt_policy_host_transport_node_profile, it seems the last standard_host_switch defined overwrites the previous.


resource "nsxt_policy_host_transport_node_profile" "host-transport-node-profile" {
  for_each     = { for display_name in var.host-transport-nodes : display_name.display_name => display_name }
  display_name = "${each.value.display_name}_host-transport-node-profile"
  description  = "${each.value.display_name}_host-transport-node-profile"

  standard_host_switch {
    host_switch_mode = "ENS_INTERRUPT"
    host_switch_type = "VDS"

    # Use "path" rather than "id", with "id" it falls apart.
    host_switch_profile = [data.nsxt_policy_uplink_host_switch_profile.host-uplink-profile[each.value.display_name].path]
    # In order to find the host_switch_id you need to you use the vsphere provider, use a data block for vsphere_distributed_virtual_switch
    host_switch_id = data.vsphere_distributed_virtual_switch.overlay-vds[each.value.display_name].id
    ip_assignment {
      assigned_by_dhcp = false
      static_ip_pool   = data.nsxt_policy_ip_pool.host-ip-tep-pool[each.value.display_name].path
    }
    transport_zone_endpoint {
      transport_zone = data.nsxt_policy_transport_zone.overlay-transport-zone.path
    }
    # transport_zone_endpoint {
    #   transport_zone = data.nsxt_policy_transport_zone.vlan-transport-zone.path
    # }
    is_migrate_pnics = false
    #################################################################################################################################  
    uplink {
        uplink_name     = "uplink-1"
        vds_uplink_name = "Uplink 1"
      }
    uplink {
        uplink_name     = "uplink-2"
        vds_uplink_name = "Uplink 2"
      }            
    }
    #################################################################################################################################      
  standard_host_switch {
    host_switch_mode = "ENS_INTERRUPT"
    host_switch_type = "VDS"

    # Use "path" rather than "id", with "id" it falls apart.
    host_switch_profile = [data.nsxt_policy_uplink_host_switch_profile.host-uplink-profile[each.value.display_name].path]
    # In order to find the host_switch_id you need to you use the vsphere provider, use a data block for vsphere_distributed_virtual_switch
    host_switch_id = data.vsphere_distributed_virtual_switch.uplink-vds[each.value.display_name].id
    ip_assignment {
      assigned_by_dhcp = false
      static_ip_pool   = data.nsxt_policy_ip_pool.host-ip-tep-pool[each.value.display_name].path
    }
    transport_zone_endpoint {
      transport_zone = data.nsxt_policy_transport_zone.vlan-transport-zone.path
    }
    is_migrate_pnics = false
    #################################################################################################################################  
    uplink {
        uplink_name     = "uplink-1"
        vds_uplink_name = "Uplink 1"
      }
    uplink {
        uplink_name     = "uplink-2"
        vds_uplink_name = "Uplink 2"
      }      
    }
#################################################################################################################################      
}

from terraform-provider-nsxt.

ksamoray avatar ksamoray commented on September 15, 2024

@msyretis fix should apply to nsxt_transport_node, nsxt_policy_host_transport_node, and nsxt_policy_host_transport_node_profile resources.

from terraform-provider-nsxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.