Skip to content

Add support for project VPCs in network data source#2606

Merged
tenthirtyam merged 1 commit intovmware:mainfrom
ksamoray:network-project-vpc
Sep 16, 2025
Merged

Add support for project VPCs in network data source#2606
tenthirtyam merged 1 commit intovmware:mainfrom
ksamoray:network-project-vpc

Conversation

@ksamoray
Copy link
Copy Markdown
Contributor

Summary

Network datasource has a capability to find a network which belongs to NSX default project.

But VPC subnets can be nested under different project, and as network names are not unique, it is required to use the project id as part of the network identification.

Type

  • fix: Bug Fix
  • feat: Feature or Enhancement
  • docs: Documentation
  • refactor: Refactoring
  • chore: Build, Dependencies, Workflows, etc.
  • other: Other (Please describe.)

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Tests

  • Tests have been added or updated.
  • Tests have been completed.

Output:

=== RUN   TestAccDataSourceVSphereNetwork_dvsPortgroup
--- PASS: TestAccDataSourceVSphereNetwork_dvsPortgroup (147.31s)
=== RUN   TestAccDataSourceVSphereNetwork_withTimeout
--- PASS: TestAccDataSourceVSphereNetwork_withTimeout (147.16s)
=== RUN   TestAccDataSourceVSphereNetwork_absolutePathNoDatacenter
--- PASS: TestAccDataSourceVSphereNetwork_absolutePathNoDatacenter (138.68s)
=== RUN   TestAccDataSourceVSphereNetwork_hostPortgroups
--- PASS: TestAccDataSourceVSphereNetwork_hostPortgroups (129.20s)
=== RUN   TestAccDataSourceVSphereNetwork_vpcNetwork
--- PASS: TestAccDataSourceVSphereNetwork_vpcNetwork (129.07s)
=== RUN   TestAccDataSourceVSphereNetwork_vpcNetworkAndProject
--- PASS: TestAccDataSourceVSphereNetwork_vpcNetworkAndProject (129.07s)
PASS

Documentation

  • Documentation has been added or updated.

Issue References

Release Note

Add support for project VPCs in network data source

Additional Information

@ksamoray ksamoray requested a review from a team as a code owner September 15, 2025 10:23
@github-actions github-actions bot added documentation Documentation provider Provider needs-review Needs Review size/m Relative Sizing: Medium labels Sep 15, 2025
Copy link
Copy Markdown
Contributor

@spacegospod spacegospod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Copy Markdown
Contributor

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment on naming but otherwise LGTM!

@ksamoray
Copy link
Copy Markdown
Contributor Author

Post review changes test results:

=== RUN   TestAccDataSourceVSphereNetwork_dvsPortgroup
--- PASS: TestAccDataSourceVSphereNetwork_dvsPortgroup (164.18s)
=== RUN   TestAccDataSourceVSphereNetwork_withTimeout
--- PASS: TestAccDataSourceVSphereNetwork_withTimeout (158.69s)
=== RUN   TestAccDataSourceVSphereNetwork_absolutePathNoDatacenter
--- PASS: TestAccDataSourceVSphereNetwork_absolutePathNoDatacenter (148.50s)
=== RUN   TestAccDataSourceVSphereNetwork_hostPortgroups
--- PASS: TestAccDataSourceVSphereNetwork_hostPortgroups (140.20s)
=== RUN   TestAccDataSourceVSphereNetwork_vpcNetwork
--- PASS: TestAccDataSourceVSphereNetwork_vpcNetwork (140.07s)
=== RUN   TestAccDataSourceVSphereNetwork_vpcNetworkAndProject
--- PASS: TestAccDataSourceVSphereNetwork_vpcNetworkAndProject (139.85s)
PASS

Network datasource has a capability to find a network which belongs to NSX
default project.

But VPC subnets can be nested under different project, and as network names are
not unique, it is required to use the project id as part of the network
identification.

Signed-off-by: Kobi Samoray <kobi.samoray@broadcom.com>
@tenthirtyam
Copy link
Copy Markdown
Contributor

I'll upstate he commit to conventional commits style and merge:

feat: add support for project VPCs in d/network

@tenthirtyam tenthirtyam merged commit 915a700 into vmware:main Sep 16, 2025
4 checks passed
@tenthirtyam
Copy link
Copy Markdown
Contributor

Merged! 915a700

@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2025
@tenthirtyam tenthirtyam removed the needs-review Needs Review label Mar 6, 2026
@tenthirtyam tenthirtyam added this to the v2.16.0 milestone Mar 6, 2026
@ksamoray ksamoray deleted the network-project-vpc branch March 8, 2026 09:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Documentation provider Provider size/m Relative Sizing: Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants