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

Add NSX-T VDC Group support for vcd_nsxt_ip_set #809

Merged
merged 13 commits into from
Mar 31, 2022

Conversation

vbauzys
Copy link
Contributor

@vbauzys vbauzys commented Mar 29, 2022

Dep: vmware/go-vcloud-director#451

This PR adds VDC Group support for:

  • vcd_nsxt_ip_set (deprecates vdc field and instead inherits parent VDC / VDC Group from NSX-T Edge Gateway)

There is a major difference in how these resources support it. IP Set follows the location of parent Edge Gateway ID - move together to VDC Group and back.

Note. The goal of this PR is to preserve backward compatibility and not break anything for existing users. vdc fields are deprecated in favor of edge_gateway_id.

Additionally:

Ran tests on 10.3.1 and 10.2.2 and upgrade tests

Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
@vbauzys vbauzys self-assigned this Mar 29, 2022
@vmware vmware deleted a comment from vmwclabot Mar 29, 2022
@vmware vmware deleted a comment from vmwclabot Mar 29, 2022
@vmware vmware deleted a comment from vmwclabot Mar 29, 2022
@vmware vmware deleted a comment from vmwclabot Mar 29, 2022
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
@vbauzys vbauzys marked this pull request as ready for review March 29, 2022 14:41
@vbauzys vbauzys removed the request for review from dataclouder March 29, 2022 14:41
website/docs/r/nsxt_ip_set.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_ip_set.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set_test.go Show resolved Hide resolved
vcd/datasource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

vcd/resource_vcd_nsxt_ip_set_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ip_set.go Outdated Show resolved Hide resolved
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
@vbauzys
Copy link
Contributor Author

vbauzys commented Mar 30, 2022

If you can add this item to the list in VDC Group guides page https://github.com/vmware/terraform-provider-vcd/blob/main/website/docs/guides/vdc_groups.html.markdown?plain=1#L65-L68

added

Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

Manual testing for migrations of 3.5.1 -> 3.6.0 with same configuration and then adjusting to new format looked to be working without recreation.

Would be nice to the test @lvirbalas mentioned just to have it covered which can take inspiration from TestAccVcdNetworkRoutedV2InheritedVdc how to patch vdc field for testing.

@vbauzys
Copy link
Contributor Author

vbauzys commented Mar 30, 2022

Manual testing for migrations of 3.5.1 -> 3.6.0 with same configuration and then adjusting to new format looked to be working without recreation.

Would be nice to the test @lvirbalas mentioned just to have it covered which can take inspiration from TestAccVcdNetworkRoutedV2InheritedVdc how to patch vdc field for testing.

IP Sets have similar unit test TestAccVcdNsxtIpSetInheritedVdc

Copy link
Contributor

@mikeletux mikeletux left a comment

Choose a reason for hiding this comment

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

I did some thorough manual testing and everything worked as expected.
Thanks!

Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
@vbauzys vbauzys merged commit 4ce6e36 into vmware:main Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants