-
Notifications
You must be signed in to change notification settings - Fork 112
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 support for Service Engine Group assignment to NSX-T Edge Gateway #738
Conversation
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
07c7fce
to
f0c559c
Compare
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with some minor formatting issues
` | ||
|
||
const testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupDedicatedDS = testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupDedicated + ` | ||
data "vcd_nsxt_alb_edgegateway_service_engine_group" "test" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not formatted.
OT: It seems that make test-binary-validate
doesn't check formatting. Needs to be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and updated (HCL validator fixes went to separate PR #746)make test-binary-validate
} | ||
|
||
const testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupShared = testAccVcdNsxtAlbGeneralSettings + ` | ||
resource "vcd_nsxt_alb_edgegateway_service_engine_group" "test" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not formatted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and updated (HCL validator fixes went to separate PR #746)make test-binary-validate
` | ||
|
||
const testAccVcdNsxtAlbEdgeServiceEngineGroupSharedDS = testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupDedicated + ` | ||
data "vcd_nsxt_alb_edgegateway_service_engine_group" "test" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not formatted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and updated (HCL validator fixes went to separate PR #746)make test-binary-validate
` | ||
|
||
const testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupSharedStep3 = testAccVcdNsxtAlbGeneralSettings + ` | ||
resource "vcd_nsxt_alb_edgegateway_service_engine_group" "test" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not formatted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and updated (HCL validator fixes went to separate PR #746)make test-binary-validate
return diag.Errorf("error reading ALB Service Engine Group assignment to Edge Gateway: %s", err) | ||
} | ||
edgeAlbServiceEngineGroupAssignmentConfig := getAlbServiceEngineGroupAssignmentType(d) | ||
// Inject correct ID for update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Inject correct ID for update | |
// Add correct ID for update |
Maybe just Add
is enough to avoid to much geekness :))))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
} | ||
|
||
return edgeAlbServiceEngineAssigmentConfig | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just me a little lost. Is AlbServiceEngineGroup or AlbServiceEngineGroupAssigment. In govcd I see AlbServiceEngineGroupAssigment in terraform I see both things. Are they different or the same thing with two names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Assignment word in govcd comes from API (loadBalancer/serviceEngineGroups/assignments/) however VCD UI does not use the term Assignment. The idea is that govcd follows API, while in Terraform we follow UI naming. In this case this was a leftover variable name from initial coding. I have removed the 'assignment' word.
|
||
const testAccVcdNsxtAlbEdgeGatewayServiceEngineGroupDedicated = testAccVcdNsxtAlbGeneralSettings + ` | ||
resource "vcd_nsxt_alb_edgegateway_service_engine_group" "test" { | ||
edge_gateway_id = data.vcd_nsxt_edgegateway.existing.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script not formatted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and updated (HCL validator fixes went to separate PR #746)make test-binary-validate
[docs-import]: https://www.terraform.io/docs/import/ | ||
|
||
``` | ||
terraform import vcd_nsxt_alb_settings.imported my-org.my-vdc.my-nsxt-edge-gateway-name.service-engine-group-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is service-engine-group-name is unique?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an interesting story, because this name comes exactly as in the nsxt_alb_service_engine_group
resource. It can't be specified and comes in Unique from a layer above.
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
This reverts commit 3919d0c. Signed-off-by: Dainius Serplis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean, just one nit pick :)
name = "first-se" | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line. BTW, could we capture such double new lines with the script? It's a rather common slip :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this one. Will try to do an automated check.
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
This PR adds resource and datasource to manage NSX-T ALB Service Engine Group assignment to Edge Gateways. It is named quite lengthy
vcd_nsxt_alb_edgegateway_service_engine_group
, but should reflect that this resource handle Service Engine Group assignments to Edge gateways as opposed to resourcevcd_nsxt_alb_service_engine_group
defining Service Engine Groups for provider in general.Note. This is the last "setup" resource that requires System user. The next resources should be manageable by Org users and allow instantiate load balancers based on this setup.
Also:
vcd_library_certificate
invcd.erb
.README.md
- changed old links to new ones, fixed broken logo link and rebranded remaining "vCloud Director" names to "VMware Cloud Director"Improves(moved out to separate PR due to many fixes Fix 'make test-binary-validate' command and all HCL errors #746)make test-binary-validate
so that it tests outterraform fmt -check
on binary test filesAcceptance and binary tests passed on 10.2 and 10.3