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

Vpc branch merge #1482

Merged
merged 214 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
6f8a9b1
Baseline for VPC2.0
annakhm Jul 11, 2024
25d8f8d
Revise GitHub actions files to run on feature branches
ksamoray Jul 10, 2024
ed2e296
Merge pull request #1260 from ksamoray/f-github-actions
ksamoray Jul 22, 2024
d735338
Switch to updated temporary SDK
annakhm Jul 22, 2024
a505650
Fix VPC documentation with correct DS name
ksamoray Jul 23, 2024
5d98d70
Merge pull request #1269 from vmware/sdk-midjuly
annakhm Jul 23, 2024
3b25446
Merge pull request #1271 from ksamoray/vpc_r_docfix
ksamoray Jul 24, 2024
b7a2f96
Fix failing tests on vpc20 branch
ksamoray Jul 24, 2024
8b13758
Add length validation to display name and desc
annakhm Jul 22, 2024
e22edab
Merge pull request #1278 from ksamoray/vpc-testfix
ksamoray Jul 25, 2024
edaa039
GatewayConnection autogenerated files
ksamoray Jul 17, 2024
a02a019
Add new member types to group criteria
annakhm Jul 27, 2024
61dbcf3
Manual edits for GatewayConnection
ksamoray Jul 17, 2024
5236c1d
Add VPC group data source
annakhm Jul 30, 2024
c07330b
Merge pull request #1259 from ksamoray/gateway-connection
ksamoray Jul 30, 2024
e2fee37
Merge pull request #1285 from vmware/add-member-type
annakhm Jul 30, 2024
dbd0a9b
Merge pull request #1289 from vmware/vpc-group-data
annakhm Jul 30, 2024
6620922
Fix nsxt_vpc_group datasource documentation
ksamoray Jul 31, 2024
b42a2d0
Add id field validator and apply to context ids
ksamoray Jul 25, 2024
8b44c1b
VPC 2.0 Service Profile support
annakhm Jul 24, 2024
2b392c7
Merge pull request #1286 from vmware/vpc20-service-profile2
annakhm Jul 31, 2024
9c0c170
Update temporary SDK
annakhm Jul 31, 2024
edbba49
Merge pull request #1295 from vmware/update-temp-sdk
ksamoray Aug 1, 2024
70ce9bc
Merge pull request #1292 from ksamoray/ds_vpc_group_docfix
ksamoray Aug 1, 2024
7fe2676
Merge pull request #1293 from ksamoray/id-validator-cp
ksamoray Aug 1, 2024
10341d3
Fix VPC datasource doc category
ksamoray Aug 1, 2024
54a0613
Update GatewayConnection to latest schema
ksamoray Aug 1, 2024
0359ea0
Merge pull request #1298 from ksamoray/vpc-doc-category
ksamoray Aug 1, 2024
5d14135
Fixes in VPC documentation
annakhm Aug 1, 2024
b083e45
Merge pull request #1302 from vmware/fix-vpc-docs
annakhm Aug 1, 2024
d217e87
VPC connectivity profile and transit gateway
annakhm Jul 24, 2024
c5804c8
Merge pull request #1299 from ksamoray/gw-connection-fix
annakhm Aug 2, 2024
775a127
Merge pull request #1296 from vmware/vpc-conn-trann
annakhm Aug 6, 2024
0961630
VPC resource
annakhm Jul 11, 2024
2f3e241
Protect against empty import ID
annakhm Aug 7, 2024
384a29e
Validate that NTP server is host or IP
ksamoray Aug 8, 2024
23e5724
Documentation fixes for VPC resources
ksamoray Aug 8, 2024
0c63cce
Merge pull request #1309 from ksamoray/vpc_service_profile_doc
annakhm Aug 8, 2024
61b5a31
Merge pull request #1305 from vmware/empty-import-id
annakhm Aug 8, 2024
25506e9
Fix crash in metadata code with empty clause
annakhm Jul 26, 2024
fcdecfe
Merge pull request #1308 from ksamoray/validate-host-or-ipaddr
ksamoray Aug 9, 2024
bc6f715
Merge pull request #1311 from vmware/fix-metadata-vpc
annakhm Aug 9, 2024
70880db
Merge branch 'vpc20-feature-branch' into vpc-resource
annakhm Aug 9, 2024
e262403
Merge pull request #1255 from vmware/vpc-resource
annakhm Aug 9, 2024
ddfe6c6
Disallow empty tag{} clause in VPC resources
annakhm Aug 9, 2024
97c72f8
Remove subnet profiles from VPC resource
annakhm Aug 10, 2024
32fa9cf
Remove is_default flag from vpc service profile
annakhm Aug 12, 2024
a11fa20
Merge pull request #1313 from vmware/remove-subnet-profiles
annakhm Aug 13, 2024
2ac37e2
Merge pull request #1312 from vmware/empty-tag
annakhm Aug 13, 2024
0d48610
Fix VPC doc
annakhm Aug 13, 2024
2113f4d
Update temporary SDK to latest spec
annakhm Aug 14, 2024
a90d423
Update connectivity_profile to latest API
ksamoray Aug 20, 2024
d6681f0
Merge pull request #1318 from vmware/update-sdk3
ksamoray Aug 20, 2024
1e94e5a
Merge pull request #1320 from ksamoray/conn_prof_fix
ksamoray Aug 20, 2024
18bfa76
Support vpc nat resource and its friends
annakhm Jul 3, 2024
b6bd293
Run VPC NAT rule test only for VPC
ksamoray Jul 16, 2024
35d0a90
Regenerate VPC NAT resources with new API
annakhm Jul 24, 2024
16e5316
Address test failure
ksamoray Aug 20, 2024
f87f696
Sync Project resource with latest API
salv-orlando Aug 15, 2024
4cb238a
Merge pull request #1319 from salv-orlando/extend_project
ksamoray Aug 21, 2024
95dbbe2
Add new project properties to documentation
salv-orlando Aug 21, 2024
2215dff
Merge pull request #1323 from salv-orlando/document_extend_project
ksamoray Aug 22, 2024
c31c262
Merge pull request #1276 from vmware/new-vpc-nat
salv-orlando Aug 22, 2024
86ca5af
Add TransitGatewayAttachmentResource
ksamoray Jul 17, 2024
d100d8a
Manual edits for TransitGatewayAttachment
ksamoray Jul 18, 2024
0f7645d
Merge pull request #1263 from ksamoray/transit-gw-attachment
salv-orlando Aug 22, 2024
b15ce15
[VPC 2.0] Update vpc_ip_address_allocation
salv-orlando Aug 22, 2024
c55c2ce
Merge pull request #1314 from vmware/improve-service-profile
salv-orlando Aug 22, 2024
360b8ed
Merge pull request #1324 from salv-orlando/b3426494
salv-orlando Aug 23, 2024
da23cbe
VPC conn profile: do not enable service gateway by default
salv-orlando Aug 23, 2024
624770f
Policy Group: Check for nil entries in criteria block
salv-orlando Aug 24, 2024
c0d8665
Merge pull request #1325 from salv-orlando/b3425642
salv-orlando Aug 25, 2024
6646a6c
Merge pull request #1326 from salv-orlando/b3424627
salv-orlando Aug 26, 2024
3783df6
Merge pull request #1316 from vmware/fix-vpc-doc
salv-orlando Aug 26, 2024
85b277f
Remove category attribute from VPC GW, security policy resources
ksamoray Aug 4, 2024
90aad48
VPC tests should run on VPC environment
ksamoray Aug 8, 2024
e9f4f3e
Fix tier1 for v4.2.0
ksamoray Jul 29, 2024
e0699fa
Fix test failures with NSX v4.2.0
ksamoray Jul 24, 2024
fa9657c
Fix test failures with v9.0.0
ksamoray Aug 23, 2024
c524f93
[TGW attachment] Fix documentation for connection_path
salv-orlando Aug 26, 2024
6f03c45
Merge pull request #1328 from salv-orlando/b3426842
salv-orlando Aug 27, 2024
5ffaa62
Merge pull request #1329 from ksamoray/vpc_no_category-cp
ksamoray Aug 27, 2024
a3b4a0c
Documentation fixes
ksamoray Jul 22, 2024
739ec7f
Context in nsxt_vpc_group should be required
ksamoray Jul 22, 2024
4cc7e6d
VPC subnet resource implmentation
ksamoray Jul 1, 2024
32896c6
Manual changes post-generation
ksamoray Jul 1, 2024
b98f3e7
Revise VPC subnet resource with latest generator
ksamoray Jul 22, 2024
c374209
Fix merge
annakhm Aug 27, 2024
72a0a78
VPC subnet and subnet port data sources
annakhm Aug 27, 2024
3ed13bf
Correct VPC docs
annakhm Aug 28, 2024
a8cf8cd
Merge pull request #1333 from vmware/fix-more-doc
ksamoray Aug 28, 2024
61a229c
Merge pull request #1332 from vmware/vpc-port-data
annakhm Aug 28, 2024
76df560
Adjust subnet attributes to latest NSX
annakhm Aug 28, 2024
1105e98
External address VPC resource
annakhm Aug 29, 2024
e18f26b
Merge pull request #1307 from ksamoray/acctests-vpc20
ksamoray Aug 29, 2024
b1d7d58
Merge pull request #1330 from vmware/merge-vpc-feature
annakhm Aug 29, 2024
9518b51
Merge branch 'vpc20-feature-branch' into vpc-external-address
annakhm Aug 29, 2024
2c2c42d
Merge pull request #1336 from vmware/vpc-external-address
annakhm Aug 29, 2024
e64cf73
Adjust VPC service profile to NSX changes
annakhm Aug 29, 2024
9eb0556
Merge pull request #1337 from vmware/adjust-service-profile
salv-orlando Aug 30, 2024
7fdaaf0
Support for distributed vlan connection resource
annakhm Aug 30, 2024
aa1d87f
Add VPC profile data sources
annakhm Aug 30, 2024
21fb9e3
Adjust LB appliance size in test to new setup
annakhm Aug 30, 2024
8059238
Merge pull request #1344 from vmware/fix-ci
ksamoray Sep 1, 2024
3af4db0
Rename nsxt_transit_gateway to nsxt_policy_transit_gateway
ksamoray Aug 30, 2024
fe4643b
Merge pull request #1339 from ksamoray/rename_transit_gw
ksamoray Sep 1, 2024
5ae5aa9
Merge pull request #1343 from vmware/vpc-data-sources
salv-orlando Sep 2, 2024
bee29b4
[VPC 2.0] Make transit_subnets for TGW computed
salv-orlando Aug 30, 2024
cf185e0
Merge pull request #1340 from salv-orlando/b3430220
salv-orlando Sep 2, 2024
9339dad
Merge pull request #1342 from vmware/vlan-connection
salv-orlando Sep 2, 2024
0b9b5fb
Add Transit Gateway data source
ksamoray Sep 2, 2024
a3c06bd
[VPC 2.0] Add Private_TGW subnet access mode
salv-orlando Sep 2, 2024
31b0824
Merge pull request #1347 from ksamoray/ds-twg
ksamoray Sep 3, 2024
d81b86a
Merge pull request #1349 from salv-orlando/3430568
salv-orlando Sep 3, 2024
49eb374
Validate no port on VPC subnet before deletion
annakhm Sep 4, 2024
80d250a
[VPC2.0] VPC: short_id must use OmitIfEmpty
salv-orlando Sep 4, 2024
14f6817
Documentation updates for VPC2.0 resources
salv-orlando Sep 4, 2024
bbce51c
Merge pull request #1355 from salv-orlando/doc_fixes
ksamoray Sep 4, 2024
2f46d18
Merge pull request #1354 from salv-orlando/b3431489
ksamoray Sep 4, 2024
be55760
Add missing VPC docs
annakhm Aug 30, 2024
9f3e6d6
Merge pull request #1352 from vmware/vpc-subnet-ports
annakhm Sep 4, 2024
a7da2ff
Merge pull request #1338 from vmware/missing-docs
annakhm Sep 5, 2024
81758de
[Documentation] Amend sample for TGW attachment resource
salv-orlando Sep 5, 2024
7a11106
Add support for transit gateway NAT
annakhm Sep 7, 2024
811f231
Merge pull request #1358 from salv-orlando/b3426842-2
salv-orlando Sep 9, 2024
6582660
Merge pull request #1360 from vmware/tgw-nat
annakhm Sep 9, 2024
d8bd5f4
Enable VPC policy rule test with context profiles
annakhm Sep 6, 2024
e9e70bb
Allow configuration of nsx_id in policy rule
annakhm Sep 4, 2024
32340df
Remove context block from shared resource
annakhm Sep 10, 2024
284a210
Adjust VPC resources to latest API
annakhm Sep 12, 2024
a11edfa
Merge pull request #1366 from vmware/adjust-vpc-again
salv-orlando Sep 16, 2024
1b26385
Update GitHub actions to latest versions
ksamoray Sep 16, 2024
a1a3861
Docuemntation fixes to VPC resource
ksamoray Sep 16, 2024
124c9fa
Merge pull request #1370 from ksamoray/docfix
ksamoray Sep 16, 2024
481bf0a
Merge pull request #1369 from ksamoray/gh-actions
ksamoray Sep 16, 2024
571dda6
Merge pull request #1364 from vmware/cp-context-changes
annakhm Sep 17, 2024
3b588d2
Support VPC static route resource
annakhm Sep 18, 2024
750d0aa
Merge pull request #1373 from vmware/vpc-static-route
salv-orlando Sep 18, 2024
d818efb
Expand VPC Subnet resource to meet the API
annakhm Sep 17, 2024
ffd6bcd
Merge pull request #1372 from vmware/vpc-subnet-expand
ksamoray Sep 19, 2024
8e97a75
Fix VPC docs
annakhm Sep 20, 2024
aea3f25
Add default_security_profile attribute to project
ksamoray Sep 19, 2024
df8a3e7
Merge pull request #1376 from vmware/fix-sr-dox
annakhm Sep 20, 2024
dc93a2a
Support IP address allocation under project
annakhm Sep 19, 2024
a7cb240
Merge pull request #1374 from ksamoray/project-default-sec-profile
ksamoray Sep 22, 2024
c7d87f5
Merge pull request #1375 from vmware/project-ip-alloc
annakhm Sep 23, 2024
f0ec466
VPC subnet DHCP IPv4 static bindings resource
ksamoray Sep 16, 2024
a022cce
VPC subnet DHCP IPv4 static bindings resource
ksamoray Sep 16, 2024
c77e287
Merge pull request #1368 from ksamoray/v4-static-bindings
ksamoray Sep 23, 2024
e6bcc73
Fix VPC external address importer
annakhm Sep 23, 2024
b8e0c44
Fix VPC external address importer
annakhm Sep 23, 2024
97abc12
Add error detail to error reporting, when available
ksamoray Sep 24, 2024
417e5dd
Fix documention for nsxt_policy_project_ip_address_allocation
ksamoray Sep 24, 2024
e8c86da
Correct nat_type attribute in vpc_nat datasource
ksamoray Sep 24, 2024
2fc7065
Merge pull request #1378 from vmware/fix-external-importer
annakhm Sep 24, 2024
cde7464
Avoid sending empty dhcp relay path in VPC subnet
annakhm Sep 24, 2024
3dfe070
Merge pull request #1381 from ksamoray/vpc_nat_docfix
ksamoray Sep 25, 2024
31c2c97
Merge pull request #1380 from ksamoray/ipalloc_doc
ksamoray Sep 25, 2024
b4f757e
Merge pull request #1382 from vmware/fix-subnet-dhcp-relay
annakhm Sep 25, 2024
10dd12f
Merge pull request #1379 from ksamoray/error_detail
salv-orlando Sep 25, 2024
1c0142a
Rename nsxt_policy_ip_address_allocation funcs
ksamoray Sep 26, 2024
9b466f9
Merge pull request #1385 from ksamoray/ipalloc_rename
ksamoray Sep 26, 2024
0ba71d3
Validate policy path is actually an acceptable URL in path importers
ksamoray Sep 30, 2024
f71bf28
TGW attachment connection_path attribute should be required
ksamoray Oct 1, 2024
faef79b
Merge pull request #1391 from ksamoray/tgw-attachment-fix
salv-orlando Oct 1, 2024
436612b
IP allocation data sources under VPC and project
annakhm Oct 2, 2024
e1bf499
Merge pull request #1389 from ksamoray/validate-import-path
ksamoray Oct 2, 2024
c96214b
Disributed VLAN connection: set vlan_id and gateway_addresses as requ…
salv-orlando Oct 2, 2024
997b1d6
Fix doc for TGW NAT rule
salv-orlando Oct 2, 2024
9f77d96
Merge pull request #1392 from vmware/allocation-data-sources
salv-orlando Oct 2, 2024
673cb50
Add policy connection data sources
annakhm Sep 27, 2024
ea460c9
Merge pull request #1387 from vmware/conn-data-sources
salv-orlando Oct 2, 2024
e02e84a
Merge pull request #1394 from salv-orlando/b3441218
salv-orlando Oct 2, 2024
e47ef32
Merge pull request #1393 from salv-orlando/b3441257
salv-orlando Oct 2, 2024
a2bbd94
Fix context for project ip allocation data source
annakhm Oct 7, 2024
1c7535d
Merge pull request #1402 from vmware/fix-ip-ds
annakhm Oct 7, 2024
cad2db8
Improve validation for project importers
annakhm Oct 4, 2024
56ae035
IP allocation data sources documentation
salv-orlando Oct 8, 2024
efb9274
Merge pull request #1406 from salv-orlando/b3442424
salv-orlando Oct 8, 2024
214e040
Merge pull request #1400 from vmware/path-importer-only
annakhm Oct 8, 2024
c63e807
Documentation fixes in VPC resources
annakhm Oct 9, 2024
268d696
Fix VPC20 tests for latest platform changes
ksamoray Oct 7, 2024
f8b3fd0
Merge pull request #1407 from vmware/doc-external-ip-fix
annakhm Oct 9, 2024
1562eaa
Merge pull request #1403 from ksamoray/testfix-vpc20
salv-orlando Oct 10, 2024
f1d6495
VPC and TGW NAT rules: make Action Required
salv-orlando Oct 8, 2024
daf47af
Limit NSX Id to 1024 characters
salv-orlando Oct 9, 2024
28f7685
Merge pull request #1408 from salv-orlando/b3442842
salv-orlando Oct 10, 2024
9d6103e
Merge pull request #1405 from salv-orlando/b3442464
salv-orlando Oct 10, 2024
bf56af8
Mark partial update when NSX update fails for vpc
annakhm Oct 10, 2024
ff0ac0a
Merge pull request #1414 from vmware/fix-vpc-partial
annakhm Oct 11, 2024
6a48fda
Remove IP blocks from connectivity profiles NAT
annakhm Oct 16, 2024
01d21ad
Remove redundant data source
annakhm Oct 17, 2024
87bec3a
Merge pull request #1438 from vmware/merge-issue
salv-orlando Oct 21, 2024
91df0f2
Merge pull request #1434 from vmware/remove-ip-blocks
salv-orlando Oct 21, 2024
2c17a61
Remove redundant context attr from tgw attachment
annakhm Oct 22, 2024
4074e35
Clarify VPC group documentation
annakhm Oct 22, 2024
0eb8cad
Merge pull request #1443 from vmware/remove-context-from-tgwa
annakhm Oct 23, 2024
d6cdf56
Merge pull request #1444 from vmware/vpc-group-docs
annakhm Oct 24, 2024
9ea081c
Handle default_security_profile attribute in project read func
ksamoray Nov 3, 2024
59391db
Merge pull request #1457 from ksamoray/default_security_profile_fix
ksamoray Nov 12, 2024
066ad49
Add VPC attachment resource
annakhm Oct 23, 2024
8aa682d
Merge pull request #1464 from vmware/vpc-attachment-resource
annakhm Nov 12, 2024
d8910a4
Handle project path parsing properly
ksamoray Nov 19, 2024
0cc3fe1
Merge pull request #1467 from ksamoray/policy_path_parse_err
ksamoray Nov 20, 2024
04283e3
Adjust to DHCP changes in service and subnet
annakhm Nov 16, 2024
10df7e1
Merge pull request #1466 from vmware/dhcp-changes
annakhm Nov 25, 2024
53d8516
Fix formatting
annakhm Nov 26, 2024
68e74c2
Merge pull request #1472 from vmware/fix-fmt
annakhm Nov 26, 2024
c5b171f
Allow updating vpc and project IP allocation
annakhm Nov 13, 2024
2413c69
Merge pull request #1477 from vmware/fix-vpc-ip-allocation
annakhm Dec 5, 2024
cab9073
Merge branch 'vpc20-feature-branch'
annakhm Dec 13, 2024
04f276a
Add validator for reserved IP ranges
annakhm Dec 6, 2024
40ee24f
Fix policy importer helper to handle non-path parameter
ksamoray Dec 18, 2024
9d99e4c
Add `vc_folder` flag to project definition.
annakhm Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/website-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Install tools
run: make tools
- name: Website Lint
Expand Down
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ linters:
linters-settings:
errcheck:
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,fmt:.*,io:Close
revive:
rules:
- name: unreachable-code
- name: errorf
- name: range
- name: superfluous-else
- name: var-declaration
- name: duplicated-imports
4 changes: 2 additions & 2 deletions api/infra/segments/segment_configuration_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (c SegmentConfigurationStateClientContext) Get(segmentsIdParam string, curs

case utl.Local:
client := c.Client.(client0.StateClient)
obj, err = client.Get(segmentsIdParam, cursorParam, edgePathParam, enforcementPointPathParam, includeMarkForDeleteObjectsParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam, sourceParam, statsTypeParam, transportNodeIdParam)
obj, err = client.Get(segmentsIdParam, nil, cursorParam, edgePathParam, enforcementPointPathParam, includeMarkForDeleteObjectsParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam, sourceParam, statsTypeParam, transportNodeIdParam)
if err != nil {
return obj, err
}
Expand All @@ -62,7 +62,7 @@ func (c SegmentConfigurationStateClientContext) Get(segmentsIdParam string, curs

case utl.Multitenancy:
client := c.Client.(client2.StateClient)
obj, err = client.Get(utl.DefaultOrgID, c.ProjectID, segmentsIdParam, cursorParam, edgePathParam, enforcementPointPathParam, includeMarkForDeleteObjectsParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam, sourceParam, statsTypeParam, transportNodeIdParam)
obj, err = client.Get(utl.DefaultOrgID, c.ProjectID, segmentsIdParam, nil, cursorParam, edgePathParam, enforcementPointPathParam, includeMarkForDeleteObjectsParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam, sourceParam, statsTypeParam, transportNodeIdParam)
if err != nil {
return obj, err
}
Expand Down
21 changes: 15 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ module github.com/vmware/terraform-provider-nsxt

go 1.22

replace (
github.com/vmware/vsphere-automation-sdk-go/lib => github.com/vmware/vsphere-automation-sdk-go/lib v0.7.1-0.20241113023437-5938c535c194
github.com/vmware/vsphere-automation-sdk-go/runtime => github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.1-0.20241113023437-5938c535c194
github.com/vmware/vsphere-automation-sdk-go/services/nsxt => github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.1-0.20241113023437-5938c535c194
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm => github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.1-0.20241113023437-5938c535c194
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp => github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.1-0.20241113023437-5938c535c194
)

require (
github.com/google/uuid v1.6.0
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0
github.com/stretchr/testify v1.10.0
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.1-0.20240611083326-25a4e1834c4d
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.0
Expand All @@ -28,7 +36,7 @@ require (
github.com/gibson042/canonicaljson-go v1.0.3 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -38,7 +46,7 @@ require (
github.com/hashicorp/go-plugin v1.5.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hc-install v0.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
Expand All @@ -51,21 +59,22 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.1 // indirect
Expand Down
49 changes: 26 additions & 23 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
Expand All @@ -77,8 +77,8 @@ github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKe
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hc-install v0.6.0 h1:fDHnU7JNFNSQebVKYhHZ0va1bC6SrPQ8fpebsvNr2w4=
github.com/hashicorp/hc-install v0.6.0/go.mod h1:10I912u3nntx9Umo1VAeYPUUuehk0aRQJYpMwbX5wQA=
github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8=
github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM=
Expand Down Expand Up @@ -108,8 +108,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
Expand All @@ -120,8 +118,8 @@ github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa1
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
Expand Down Expand Up @@ -150,21 +148,23 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f h1:NbC9yOr5At92seXK+kOr2TzU3mIWzcJOVzZasGSuwoU=
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f/go.mod h1:VEqcmf4Sp7gPB7z05QGyKVmn6xWppr7Nz8cVNvyC80o=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0 h1:pT+oqJ8FD5eUBQkl+e7LZwwtbwPvW5kDyyGXvt66gOM=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0/go.mod h1:f3+6YVZpNcK2pYyiQ94BoHWmjMj9BnYav0vNFuTiDVM=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0 h1:pSBxa9Agh6bgW8Hr0A1eQxuwnxGTnuAVox8iQb023hg=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0/go.mod h1:qdzEFm2iK3dvlmm99EYYNxs70HbzuiHyENFD24Ps8fQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.0 h1:+kcDO69bfIB87KZUAYQ4AqrXlnZhpZz+QwzIB+TseqU=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.0/go.mod h1:upLH9b9zpG86P0wwO4+gREf0lBXr8gYcs7P1FRZ9n30=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.0 h1:vaWjTOvt9vPKZjA8ojTRC1o92Rm9ScR/GwWEd6JLMOk=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.0/go.mod h1:gcEvyczWPFMZX2gkBiBVpOwvUGSNXSpxU19Sx9aiouY=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.0 h1:+jS0YH9dEp8rC00SsaY5feFpVgp4Lu0YBnBe3T7zfqo=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.0/go.mod h1:ugk9I4YM62SSAox57l5NAVBCRIkPQ1RNLb3URxyTADc=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.1-0.20241113023437-5938c535c194 h1:4+nN9YcmXs8uXoKhsQpg0K8ziNTg8zULbdvc3Mu/Dk0=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.1-0.20241113023437-5938c535c194/go.mod h1:f3+6YVZpNcK2pYyiQ94BoHWmjMj9BnYav0vNFuTiDVM=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.1-0.20241113023437-5938c535c194 h1:4NmoWzW501ZhriPGzGULj6mJmr2Dx6QyUO9CmRbuMg0=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.1-0.20241113023437-5938c535c194/go.mod h1:qdzEFm2iK3dvlmm99EYYNxs70HbzuiHyENFD24Ps8fQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.1-0.20241113023437-5938c535c194 h1:M4/j0HbfW+pFbcpZdbg7wid3WxkIFOZRXuWNi+llXEc=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.1-0.20241113023437-5938c535c194/go.mod h1:M+J1qwzF4o7sAb/2VRu/edl1HLCdC++C4SNUrgiuGlQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.1-0.20241113023437-5938c535c194 h1:/+cOYJUazdOQ8sMePBcCoCnnLrQDvIvxjYYDKcdwe4Y=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.9.1-0.20241113023437-5938c535c194/go.mod h1:gcEvyczWPFMZX2gkBiBVpOwvUGSNXSpxU19Sx9aiouY=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.1-0.20241113023437-5938c535c194 h1:Q2jxex1UrZOMwJVJHSEyZcuWzQjsEeDpzDfc3zrtI1A=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.1-0.20241113023437-5938c535c194/go.mod h1:ugk9I4YM62SSAox57l5NAVBCRIkPQ1RNLb3URxyTADc=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc=
github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho=
github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
Expand All @@ -175,8 +175,8 @@ golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoH
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand All @@ -197,6 +197,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down Expand Up @@ -230,8 +232,9 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
Expand Down
32 changes: 32 additions & 0 deletions nsxt/data_source_nsxt_policy_distributed_vlan_connection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Copyright © 2022 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: MPL-2.0 */

package nsxt

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func dataSourceNsxtPolicyDistributedVlanConnection() *schema.Resource {
return &schema.Resource{
Read: dataSourceNsxtPolicyDistributedVlanConnectionRead,

Schema: map[string]*schema.Schema{
"id": getDataSourceIDSchema(),
"path": getPathSchema(),
"display_name": getDisplayNameSchema(),
"description": getDescriptionSchema(),
},
}
}

func dataSourceNsxtPolicyDistributedVlanConnectionRead(d *schema.ResourceData, m interface{}) error {
connector := getPolicyConnector(m)

_, err := policyDataSourceResourceReadWithValidation(d, connector, getSessionContext(d, m), "DistributedVlanConnection", nil, false)
if err != nil {
return err
}

return nil
}
38 changes: 38 additions & 0 deletions nsxt/data_source_nsxt_policy_gateway_connection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Copyright © 2022 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: MPL-2.0 */

package nsxt

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func dataSourceNsxtPolicyGatewayConnection() *schema.Resource {
return &schema.Resource{
Read: dataSourceNsxtPolicyGatewayConnectionRead,

Schema: map[string]*schema.Schema{
"id": getDataSourceIDSchema(),
"tier0_path": getPolicyPathSchema(false, false, "Tier0 Gateway path"),
"path": getPathSchema(),
"display_name": getDisplayNameSchema(),
"description": getDescriptionSchema(),
},
}
}

func dataSourceNsxtPolicyGatewayConnectionRead(d *schema.ResourceData, m interface{}) error {
connector := getPolicyConnector(m)

gwPath := d.Get("tier0_path").(string)
query := make(map[string]string)
if len(gwPath) > 0 {
query["tier0_path"] = gwPath
}
_, err := policyDataSourceResourceReadWithValidation(d, connector, getSessionContext(d, m), "GatewayConnection", query, false)
if err != nil {
return err
}

return nil
}
Loading
Loading