Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsx_edge_transport_node fails to create edge when using standard_host_switch with static_ip ip_assignment #1153

Closed
martinrohrbach opened this issue Mar 15, 2024 · 1 comment · Fixed by #1161
Assignees
Labels
bug Bug

Comments

@martinrohrbach
Copy link
Contributor

Describe the bug

In addition to #1146 we found another problem with the nsx_edge_transport_node resource. When using a ip_assignment of static_ip for the standard_host_switch like so:

resource "nsxt_edge_transport_node" "test2” {
  description  = "edge-test"
  display_name = "edge-test"

  standard_host_switch {
    host_switch_id = "xxx"
    ip_assignment {
      static_ip {
        ip_addresses = ["xxx"]
        subnet_mask = "xxx"
        default_gateway = "xxx"
      }
    }
    transport_zone_endpoint {
      transport_zone          = "xxx“
      transport_zone_profiles = ["xxx"]
    }
    host_switch_profile = ["xxx"]
    pnic {
      device_name = "fp-eth0"
      uplink_name = "uplink"
    }
  }

  deployment_config {
    form_factor = "SMALL"
    node_user_settings {
      cli_password  = "VMware1!VMware1!"
      root_password = "VMware1!VMware1!"
    }
    vm_deployment_config {
        <redacted>
    }
  }
 
  node_settings {
    hostname             = "edge-test"
    allow_ssh_root_login = true
    enable_ssh           = true
  }
}

We get the following error when applying this to NSX-T:

│ Error: failed to create Transport Node: error parsing HostSwitchSpec schema no valid IP assignment found
│
│ with nsxt_edge_transport_node.test2,
│ on [edges.tf](http://edges.tf/) line 1, in resource "nsxt_edge_transport_node" "test2":
│ 1: resource "nsxt_edge_transport_node" "test2" {

We're not sure what happens there as we cannot see the API call that the provider send to the backend, but somehow the info in the schema is not correctly translated?

Reproduction steps

  1. Create a nsxt_edge_transport_node with a static ip assignment

Expected behavior

Edge node is created with static ip assignment and no error.

Additional context

No response

@martinrohrbach martinrohrbach added the bug Bug label Mar 15, 2024
@martinrohrbach
Copy link
Contributor Author

We're testing against NSX 4.1.1.0 in our test environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants