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 Resource NSX-T Route Advertisement #858

Merged
merged 55 commits into from
Jun 16, 2022

Conversation

mikeletux
Copy link
Contributor

This PR relies on govcd PR vmware/go-vcloud-director#478

Description

This PR brings the possibility of adding route advertisement to an NSX-T Edge Gateway.

Detailed description

This new resource implements a new resource for NSX-T Edge Gateway, that allows to publish networks to the NSX-T Tier-0 Gateway. Please bear in mind that for this resource to work, the NSX-T Edge Gateway option "Use dedicate Tier-0 Gateway" must be active, otherwise this resource will fail on its creation.

An example HCL file where this resource is used could be:

data "vcd_org_vdc" "my_vdc" {
  org = "my-org"
  name = "my-vdc"
}

data "vcd_nsxt_edgegateway" "my_edge_gateway" {
  owner_id = data.vcd_org_vdc.my_vdc.id
  name     = "my-nsxt-edge-gateway"
}

resource "vcd_nsxt_route_advertisement" "my_route_advertisement" {
  edge_gateway_id = data.vcd_nsxt_edgegateway.my_edge_gateway.id
  enabled = true
  subnets = ["192.168.1.0/24", "192.168.2.0/24"]
}

As seen in the HCL code snippet, route advertisement will be enabled on NSX-T Edge Gateway and a couple of subnets will be advertised: 192.168.1.0/24 and 192.168.2.0/24.

Miguel Sama added 20 commits May 26, 2022 11:16
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux marked this pull request as ready for review May 30, 2022 08:36
Signed-off-by: Miguel Sama <msama@vmware.com>
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_route_advertisement.go Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
website/docs/r/nsxt_route_advertisement.html.markdown Outdated Show resolved Hide resolved
Miguel Sama added 3 commits June 13, 2022 14:47
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@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.

Nice work, thanks!

Miguel Sama added 2 commits June 14, 2022 11:56
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

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

Almost there :)

Miguel Sama added 5 commits June 14, 2022 15:30
Signed-off-by: Miguel Sama <msama@vmware.com>
…t by default

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
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.

Thanks for all the fixes

@Didainius Didainius requested review from dataclouder and removed request for dataclouder June 14, 2022 18:05
Miguel Sama added 6 commits June 15, 2022 09:47
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
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