diff --git a/nsxt/data_source_nsxt_edge_transport_node.go b/nsxt/data_source_nsxt_transport_node.go similarity index 93% rename from nsxt/data_source_nsxt_edge_transport_node.go rename to nsxt/data_source_nsxt_transport_node.go index 75d364976..b685ac84d 100644 --- a/nsxt/data_source_nsxt_edge_transport_node.go +++ b/nsxt/data_source_nsxt_transport_node.go @@ -13,9 +13,9 @@ import ( "github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp/nsx/model" ) -func dataSourceNsxtEdgeTransportNode() *schema.Resource { +func dataSourceNsxtTransportNode() *schema.Resource { return &schema.Resource{ - Read: dataSourceNsxtEdgeTransportNodeRead, + Read: dataSourceNsxtTransportNodeRead, Schema: map[string]*schema.Schema{ "id": getDataSourceIDSchema(), @@ -25,7 +25,7 @@ func dataSourceNsxtEdgeTransportNode() *schema.Resource { } } -func dataSourceNsxtEdgeTransportNodeRead(d *schema.ResourceData, m interface{}) error { +func dataSourceNsxtTransportNodeRead(d *schema.ResourceData, m interface{}) error { connector := getPolicyConnector(m) client := nsx.NewTransportNodesClient(connector) diff --git a/nsxt/data_source_nsxt_edge_transport_node_test.go b/nsxt/data_source_nsxt_transport_node_test.go similarity index 72% rename from nsxt/data_source_nsxt_edge_transport_node_test.go rename to nsxt/data_source_nsxt_transport_node_test.go index 558069dd9..0760a6334 100644 --- a/nsxt/data_source_nsxt_edge_transport_node_test.go +++ b/nsxt/data_source_nsxt_transport_node_test.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) -func TestAccDataSourceNsxtEdgeTransportNode_basic(t *testing.T) { +func TestAccDataSourceNsxtTransportNode_basic(t *testing.T) { htnName := getEdgeTransportNodeName() - testResourceName := "data.nsxt_edge_transport_node.test" + testResourceName := "data.nsxt_transport_node.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { @@ -23,7 +23,7 @@ func TestAccDataSourceNsxtEdgeTransportNode_basic(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccNSXEdgeTransportNodeReadTemplate(htnName), + Config: testAccNSXTransportNodeReadTemplate(htnName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(testResourceName, "display_name", htnName), resource.TestCheckResourceAttrSet(testResourceName, "id"), @@ -33,9 +33,9 @@ func TestAccDataSourceNsxtEdgeTransportNode_basic(t *testing.T) { }) } -func testAccNSXEdgeTransportNodeReadTemplate(name string) string { +func testAccNSXTransportNodeReadTemplate(name string) string { return fmt.Sprintf(` -data "nsxt_edge_transport_node" "test" { +data "nsxt_transport_node" "test" { display_name = "%s" }`, name) } diff --git a/nsxt/provider.go b/nsxt/provider.go index b97318655..8681a2859 100644 --- a/nsxt/provider.go +++ b/nsxt/provider.go @@ -314,7 +314,7 @@ func Provider() *schema.Provider { "nsxt_policy_host_transport_node": dataSourceNsxtPolicyHostTransportNode(), "nsxt_manager_cluster_node": dataSourceNsxtManagerClusterNode(), "nsxt_policy_host_transport_node_profile": dataSourceNsxtPolicyHostTransportNodeProfile(), - "nsxt_transport_node": dataSourceNsxtEdgeTransportNode(), + "nsxt_transport_node": dataSourceNsxtTransportNode(), "nsxt_discovered_node": dataSourceNsxtDiscoveredNode(), "nsxt_edge_upgrade_group": dataSourceNsxtEdgeUpgradeGroup(), "nsxt_host_upgrade_group": dataSourceNsxtHostUpgradeGroup(), diff --git a/website/docs/d/edge_transport_node.html.markdown b/website/docs/d/edge_transport_node.html.markdown deleted file mode 100644 index 20dd6b922..000000000 --- a/website/docs/d/edge_transport_node.html.markdown +++ /dev/null @@ -1,29 +0,0 @@ ---- -subcategory: "Beta" -layout: "nsxt" -page_title: "NSXT: edge_transport_node" -description: An Edge Transport Node data source. ---- - -# nsxt_edge_transport_node - -This data source provides information about an Edge Transport Node configured on NSX. - -## Example Usage - -```hcl -data "nsxt_edge_transport_node" "test_node" { - display_name = "edgenode1" -} -``` - -## Argument Reference - -* `id` - (Optional) The ID of Edge Transport Node to retrieve -* `display_name` - (Optional) The Display Name of the Edge Transport Node to retrieve. - -## Attributes Reference - -In addition to arguments listed above, the following attributes are exported: - -* `description` - The description of the resource. diff --git a/website/docs/d/transport_node.html.markdown b/website/docs/d/transport_node.html.markdown new file mode 100644 index 000000000..edb6135a0 --- /dev/null +++ b/website/docs/d/transport_node.html.markdown @@ -0,0 +1,29 @@ +--- +subcategory: "Beta" +layout: "nsxt" +page_title: "NSXT: transport_node" +description: An Transport Node data source. +--- + +# nsxt_edge_transport_node + +This data source provides information about Transport Node configured on NSX. + +## Example Usage + +```hcl +data "nsxt_transport_node" "test_node" { + display_name = "edgenode1" +} +``` + +## Argument Reference + +* `id` - (Optional) The ID of Transport Node to retrieve +* `display_name` - (Optional) The Display Name of the Transport Node to retrieve. + +## Attributes Reference + +In addition to arguments listed above, the following attributes are exported: + +* `description` - The description of the resource.