Comments (10)
@ksamoray can you try and reproduce to check why we get this error from NSX when creating the node via Terraform?
from terraform-provider-nsxt.
Not sure if this is of any use but I'm currently using an Ansible module to deploy the edge nodes using VLAN segment IDs. Python code below.
from terraform-provider-nsxt.
Hi,
Does using the network id (e.g EDGE-UL1-TRUNK
instead of /infra/segments/EDGE-UL1-TRUNK
) help?
from terraform-provider-nsxt.
from terraform-provider-nsxt.
Hi, I've tried to reproduce your issue - indeed the paths of the segments should be used.
Anyway I was able to create an edge node on a VLAN segment with the code below (the cluster should be connected to the VDS on vCenter):
resource "nsxt_policy_host_transport_node_profile" "tnp" {
display_name = "tnp220"
standard_host_switch {
host_switch_id = data.vsphere_distributed_virtual_switch.venv_vds.id
.
.
.
transport_zone_endpoint {
transport_zone = nsxt_policy_transport_zone.tz_overlay.path
}
transport_zone_endpoint {
transport_zone = nsxt_policy_transport_zone.tz_vlan.path
}
host_switch_profile = [nsxt_policy_uplink_host_switch_profile.uplink_host_switch_profile.path]
}
depends_on = [data.nsxt_compute_manager_realization.vc1_realization]
}
data "nsxt_compute_collection" "edge_cluster_collection" {
display_name = data.vsphere_compute_cluster.venv_edge_cluster.name
origin_id = data.nsxt_compute_manager_realization.vc1_realization.id
}
resource "nsxt_policy_host_transport_node_collection" "htnc2" {
display_name = "htnc2"
compute_collection_id = data.nsxt_compute_collection.edge_cluster_collection.id
transport_node_profile_path = nsxt_policy_host_transport_node_profile.tnp.path
depends_on = [data.nsxt_compute_manager_realization.vc1_realization]
}
resource "nsxt_policy_vlan_segment" "vlanseg" {
display_name = "vlanseg"
transport_zone_path = nsxt_policy_transport_zone.tz_vlan.path
vlan_ids = ["140"]
}
resource "nsxt_transport_node" "edgenode1" {
standard_host_switch {
transport_zone_endpoint {
transport_zone = nsxt_policy_transport_zone.tz_overlay.realized_id
}
transport_zone_endpoint {
transport_zone = nsxt_policy_transport_zone.tz_vlan.realized_id
}
host_switch_profile = [nsxt_policy_uplink_host_switch_profile.uplink_host_switch_profile.realized_id]
}
edge_node {
deployment_config {
vm_deployment_config {
data_network_ids = [nsxt_policy_vlan_segment.vlanseg.path]
compute_id = data.vsphere_compute_cluster.venv_edge_cluster.id # Cluster is connected to VDS on vCenter
.
.
.
}
}
.
.
.
}
from terraform-provider-nsxt.
@liftconfig any update?
from terraform-provider-nsxt.
@ksamoray Sorry for the late response as I've been away. Below is an example of the uplink segments and edge resource configuration when I hit this issue.
The main bits that differ from your example:
- The edge has 2 uplink VLAN segments assigned
- The VLAN trunk segments assigned to the edge uplink vNICs (data_network_id) are in a VLAN Transport Zone (TZ) that is different from the one assigned to the edge's standard_host_switch. We use one VLAN TZ for segments/portgroups configured on the ESXi hosts, and one VLAN TZ for uplink segments on the edges.
data "nsxt_compute_manager" "vc" {
display_name = "test-vc.domain.local"
}
data "nsxt_policy_uplink_host_switch_profile" "edge_uplink_profile" {
display_name = "edge_uplink_profile"
}
data "nsxt_policy_ip_pool" "edge_tep_pool" {
display_name = "edge_tep_pool"
}
# Overlay TZ assigned to hosts and edges
data "nsxt_policy_transport_zone" "tz_overlay" {
display_name = "tz_overlay"
}
#VLAN TZ assigned to edges. Contains edge uplink VLAN segments
data "nsxt_policy_transport_zone" "tz_vlan_edge" {
display_name = "tz_vlan_edge"
}
#VLAN TZ assigned to ESXi hosts. Contains infrastructure VLAN segments and trunk VLAN segments
data "nsxt_policy_transport_zone" "tz_vlan_host" {
display_name = "tz_vlan_host"
}
# Portgroup configured on host ESXi VDS. Used for edge VM uplink 1. Uplink teaming policy maps to host PNIC uplink 1
resource "nsxt_policy_vlan_segment" "trunk-uplink1" {
display_name = "trunk-uplink1"
transport_zone_path = data.nsxt_policy_transport_zone.tz_vlan_host.path
vlan_ids = ["2001", "100"]
advanced_config {
uplink_teaming_policy = "host-uplink1-active"
connectivity = "ON"
}
}
# Portgroup configured on host ESXi VDS. Used for edge VM uplink 2. Uplink teaming policy maps to host PNIC uplink 2
resource "nsxt_policy_vlan_segment" "PER01B4NSX-C11UL2-TRUNK" {
display_name = "trunk-uplink2"
transport_zone_path = data.nsxt_policy_transport_zone.tz_vlan_host.path
vlan_ids = ["2002", "100"]
advanced_config {
uplink_teaming_policy = "host-uplink2-active"
connectivity = "ON"
}
}
resource "nsxt_transport_node" "edge_node" {
display_name = "edge"
edge_node {
deployment_config {
form_factor = "XLARGE"
node_user_settings {
cli_password = var.edge_admin_password
root_password = var.edge_root_password
}
vm_deployment_config {
compute_folder_id = "group-v121234"
compute_id = "domain-c125678"
data_network_ids = [nsxt_policy_vlan_segment.trunk-uplink1.path,
nsxt_policy_vlan_segment.trunk-uplink2.path]
default_gateway_address = ["10.x.x.x"]
ipv4_assignment_enabled = true
management_network_id = "dvportgroup-121248"
storage_id = "datastore-124857"
vc_id = data.nsxt_compute_manager.PER01B4VCS01.id
management_port_subnet {
ip_addresses = ["10.x.x.x"]
prefix_length = 24
}
}
}
}
standard_host_switch {
host_switch_mode = "STANDARD"
host_switch_profile = [data.nsxt_policy_uplink_host_switch_profile.edge_uplink_profile.id]
host_switch_type = "NVDS"
ip_assignment {
assigned_by_dhcp = false
static_ip_pool = data.nsxt_policy_ip_pool.edge_tep_pool.id
}
pnic {
device_name = "fp-eth0"
uplink_name = "uplink-1"
}
pnic {
device_name = "fp-eth1"
uplink_name = "uplink-2"
}
transport_zone_endpoint {
transport_zone = data.nsxt_policy_transport_zone.tz_overlay.id
}
transport_zone_endpoint {
transport_zone = data.nsxt_policy_transport_zone.tz_vlan_edge.id
}
}
}
from terraform-provider-nsxt.
@liftconfig BTW are the related elements fully realized? e.g NSX installation over the hypervisors?
Or are those preinstalled and there are no issues of such?
from terraform-provider-nsxt.
@ksamoray yep all fully realized / pre-installed and working with no issues.
from terraform-provider-nsxt.
@liftconfig as I can't reproduce the behavior you observe, can you do the following?
- With the UI, capture the JSON object which the UI submits towards NSX during edge deployment. This can be done with "Developer Tools" on Chrome browser or "Web Developer Tools" with FireFox.
- With Terraform, set the following environment variables before you create the edge appliance:
export TF_LOG_PROVIDER=INFO
export TF_LOG_PROVIDER_NSX_HTTP=1
Obviously cleanup any info from the output which could be a security threat.
from terraform-provider-nsxt.
Related Issues (20)
- IDS profile product list - bad support HOT 3
- Allow IDS/IPS policies to leverage the 'applied to' field HOT 1
- Bulk import feature for nsx-t - [services and groups] into terraform
- Infos of data.nsxt_policy_segment_realization can't export/show via output at least in terraform plan HOT 2
- BGP AS Number in VRF Tier-0 Gateway HOT 4
- Tier-1 gateway is deployed in SR mode when cluster path defined and HA_MODE set to NONE instead of DR. HOT 3
- Datasource for transport node collections state
- Multi-TEP High Availability HOT 1
- Error: Failed to retrieve NSX version (com.vmware.vapi.std.errors.service_unavailable). HOT 4
- Problem to import segment created by HCX in NSX in VMC HOT 4
- Role binding update for local users need identity_source_type HOT 2
- nsxt_policy_dhcp_v4_static_binding.static_ip_mac_stage0 HOT 4
- Possibility to create firewall rules with protocol and port HOT 1
- Segment with "None" QoS Profile
- Add Support for Metadata Proxy Profile HOT 2
- nsx_edge_transport_node fails to create edge with two standard_host_switch entries HOT 3
- type argument is not expected on nsxt_policy_tier1_gateway resource HOT 3
- Document "Any" value for destination_networks in nsxt_policy_nat_rule HOT 5
- nsx_edge_transport_node fails to create edge when using standard_host_switch with static_ip ip_assignment HOT 1
- Cannot add virtual_server condition based on Client SSL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-nsxt.