vmware / terraform-provider-vcd

Terraform VMware Cloud Director provider
https://www.terraform.io/docs/providers/vcd/
Mozilla Public License 2.0
151 stars 112 forks source link

Add vcd_nsxt_alb_edgegateway_service_engine_group and vcd_nsxt_alb_service_engine_group to vcd_resource_list data source #1296

Closed adambarreiro closed 2 months ago

adambarreiro commented 4 months ago

Description

Closes #1145

This PR adds values vcd_nsxt_alb_edgegateway_service_engine_group and vcd_nsxt_alb_service_engine_group to the resource_type.

Tests

Test TestAccVcdDatasourceResourceList passed on 10.6.0 with the newest changes.

To test manually, add a AVI Controller, then a Cloud, then create a Service Engine Group. Then assign this Service Engine Group to an Edge gateway. The data source should then list the SEGs.

Examples:

data "vcd_resource_list" "rs" {
  name          = "foo"
  resource_type = "vcd_nsxt_alb_service_engine_group"
  list_mode     = "import"
}

data "vcd_resource_list" "rs2" {
  name          = "foo"
  resource_type = "vcd_nsxt_alb_edgegateway_service_engine_group"
  parent        = "nsxt-gw"
  list_mode     = "import"
}

Then you can import the resources with the proposed import outputs, example:

terraform import vcd_nsxt_alb_edgegateway_service_engine_group.example my-org.nsxt-vdc.nsxt-gw.seg