Skip to content

Commit 89d27c5

Browse files
authored
Allow data source lookup by id for several data sources (#1965)
The following data sources had the logic to lookup by id, but the schema validation blocks it: nsxt_policy_gateway_connection nsxt_policy_gateway_prefix_list nsxt_policy_gateway_route_map nsxt_policy_l2_vpn_service nsxt_policy_uplink_host_switch_profile nsxt_policy_vtep_ha_host_switch_profile The provider should allow to look up this object by id-only Signed-off-by: Kobi Samoray <kobi.samoray@broadcom.com>
1 parent 561ad2e commit 89d27c5

7 files changed

+7
-7
lines changed

nsxt/data_source_nsxt_compute_collection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func dataSourceNsxtComputeCollection() *schema.Resource {
1818

1919
Schema: map[string]*schema.Schema{
2020
"id": getDataSourceIDSchema(),
21-
"display_name": getDisplayNameSchema(),
21+
"display_name": getDataSourceDisplayNameSchema(),
2222
"origin_type": {
2323
Type: schema.TypeString,
2424
Optional: true,

nsxt/data_source_nsxt_policy_gateway_connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func dataSourceNsxtPolicyGatewayConnection() *schema.Resource {
1616
"id": getDataSourceIDSchema(),
1717
"tier0_path": getPolicyPathSchema(false, false, "Tier0 Gateway path"),
1818
"path": getPathSchema(),
19-
"display_name": getDisplayNameSchema(),
19+
"display_name": getDataSourceDisplayNameSchema(),
2020
"description": getDescriptionSchema(),
2121
},
2222
}

nsxt/data_source_nsxt_policy_gateway_prefix_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func dataSourceNsxtPolicyGatewayPrefixList() *schema.Resource {
1818
"id": getDataSourceIDSchema(),
1919
"gateway_path": getPolicyPathSchema(false, false, "Gateway path"),
2020
"path": getPathSchema(),
21-
"display_name": getDisplayNameSchema(),
21+
"display_name": getDataSourceDisplayNameSchema(),
2222
"description": getDescriptionSchema(),
2323
},
2424
}

nsxt/data_source_nsxt_policy_gateway_route_map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func dataSourceNsxtPolicyGatewayRouteMap() *schema.Resource {
1818
"id": getDataSourceIDSchema(),
1919
"gateway_path": getPolicyPathSchema(false, false, "Gateway path"),
2020
"path": getPathSchema(),
21-
"display_name": getDisplayNameSchema(),
21+
"display_name": getDataSourceDisplayNameSchema(),
2222
"description": getDescriptionSchema(),
2323
},
2424
}

nsxt/data_source_nsxt_policy_l2_vpn_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func dataSourceNsxtPolicyL2VpnService() *schema.Resource {
1818
"id": getDataSourceIDSchema(),
1919
"gateway_path": getPolicyPathSchema(false, false, "Gateway path"),
2020
"path": getPathSchema(),
21-
"display_name": getDisplayNameSchema(),
21+
"display_name": getDataSourceDisplayNameSchema(),
2222
"description": getDescriptionSchema(),
2323
},
2424
}

nsxt/data_source_nsxt_policy_uplink_host_switch_profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func dataSourceNsxtUplinkHostSwitchProfile() *schema.Resource {
2121
Schema: map[string]*schema.Schema{
2222
"id": getDataSourceIDSchema(),
2323
"path": getPathSchema(),
24-
"display_name": getDisplayNameSchema(),
24+
"display_name": getDataSourceDisplayNameSchema(),
2525
"description": getDescriptionSchema(),
2626
"realized_id": {
2727
Type: schema.TypeString,

nsxt/data_source_nsxt_policy_vtep_ha_host_switch_profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func dataSourceNsxtVtepHAHostSwitchProfile() *schema.Resource {
1818
Schema: map[string]*schema.Schema{
1919
"id": getDataSourceIDSchema(),
2020
"path": getPathSchema(),
21-
"display_name": getDisplayNameSchema(),
21+
"display_name": getDataSourceDisplayNameSchema(),
2222
"description": getDescriptionSchema(),
2323
},
2424
}

0 commit comments

Comments
 (0)