Skip to content

Commit ba11176

Browse files
authored
Update ALB Service Engine Group and ALB Settings to add supported_feature_set for VCD 10.4 (#878)
* vcd_nsxt_alb_controller resource and data source have license_type attribute optional from 10.4 (v37.0) onwards. * vcd_nsxt_alb_service_engine_group resource and data source have a new supported_feature_set attribute to be compatible with 10.4 (v37.0) that replaces the mentioned license_type. * vcd_nsxt_alb_settings resource and data source have a new supported_feature_set attribute to be compatible with 10.4 (v37.0) that replaces the mentioned license_type. Signed-off-by: abarreiro <abarreiro@vmware.com>
1 parent ae559e1 commit ba11176

23 files changed

+183
-33
lines changed

.changes/v3.7.0/878-improvements.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* Make `license_type` attribute on **vcd_nsxt_alb_controller** optional as it is not used from VCD v10.4 onwards [GH-878]
2+
* Add `supported_feature_set` to **vcd_nsxt_alb_service_engine_group** resource and data source to be compatible with VCD v10.4, which replaces the **vcd_nsxt_alb_controller** `license_type` [GH-878]
3+
* Add `supported_feature_set` to **vcd_nsxt_alb_settings** resource and data source to be compatible with VCD v10.4, which replaces the **vcd_nsxt_alb_controller** `license_type` [GH-878]

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ require (
77
github.com/hashicorp/go-version v1.5.0
88
github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0
99
github.com/kr/pretty v0.2.1
10-
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.14
10+
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.15
1111
)

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvC
224224
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
225225
github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY=
226226
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
227-
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.14 h1:R3h9H/8oRVdMPBSy0cUaZ8IM5+dDMnIKKi38O4dcHcw=
228-
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.14/go.mod h1:DgfzOh0u9J70FFOC2Qwy4iCjPoktg6SDdEguNi0z0H0=
227+
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.15 h1:S2SopODe2N7TCklGnB6YPGyCUzqz73oKlHeFpr+DO7Y=
228+
github.com/vmware/go-vcloud-director/v2 v2.16.0-alpha.15/go.mod h1:DgfzOh0u9J70FFOC2Qwy4iCjPoktg6SDdEguNi0z0H0=
229229
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
230230
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
231231
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

vcd/datasource_vcd_nsxt_alb_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func datasourceVcdAlbController() *schema.Resource {
3535
"license_type": {
3636
Type: schema.TypeString,
3737
Computed: true,
38-
Description: "NSX-T ALB License type. One of 'BASIC', 'ENTERPRISE'",
38+
Description: "NSX-T ALB License type. One of 'BASIC', 'ENTERPRISE'. Must not be referenced from VCD 10.4.0 onwards",
3939
},
4040
"version": {
4141
Type: schema.TypeString,

vcd/datasource_vcd_nsxt_alb_importable_cloud_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func TestAccVcdNsxtAlbImportableCloudDS(t *testing.T) {
2929
"ImportableCloud": testConfig.Nsxt.NsxtAlbImportableCloud,
3030
"Tags": "alb nsxt",
3131
}
32+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
3233
testParamsNotEmpty(t, params)
3334

3435
configText1 := templateFill(testAccVcdNsxtAlbImportableCloud, params)
@@ -68,7 +69,7 @@ resource "vcd_nsxt_alb_controller" "first" {
6869
url = "{{.ControllerUrl}}"
6970
username = "{{.ControllerUsername}}"
7071
password = "{{.ControllerPassword}}"
71-
license_type = "ENTERPRISE"
72+
{{.LicenseType}}
7273
}
7374
`
7475
const testAccVcdNsxtAlbImportableCloud = testAccVcdNsxtAlbImportableCloudPrereqs + `

vcd/datasource_vcd_nsxt_alb_service_engine_group.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package vcd
22

33
import (
44
"context"
5-
65
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
76
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
87
)
@@ -63,6 +62,11 @@ func datasourceVcdAlbServiceEngineGroup() *schema.Resource {
6362
Optional: true,
6463
Description: "Boolean value that shows if virtual services are overallocated",
6564
},
65+
"supported_feature_set": {
66+
Type: schema.TypeString,
67+
Computed: true,
68+
Description: "Feature set for this ALB Service Engine Group. One of 'STANDARD', 'PREMIUM'.",
69+
},
6670
},
6771
}
6872
}

vcd/datasource_vcd_nsxt_alb_settings.go

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ func datasourceVcdAlbSettings() *schema.Resource {
4242
Computed: true,
4343
Description: "Optional custom network CIDR definition for ALB Service Engine placement (VCD default is 192.168.255.1/25)",
4444
},
45+
"supported_feature_set": {
46+
Type: schema.TypeString,
47+
Computed: true,
48+
Description: "Feature set for ALB in this Edge Gateway. One of 'STANDARD', 'PREMIUM'.",
49+
},
4550
},
4651
}
4752
}

vcd/resource_vcd_nsxt_alb_cloud_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func TestAccVcdNsxtAlbCloud(t *testing.T) {
3232
"ImportableCloud": testConfig.Nsxt.NsxtAlbImportableCloud,
3333
"Tags": "nsxt alb",
3434
}
35+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
3536
testParamsNotEmpty(t, params)
3637

3738
configText1 := templateFill(testAccVcdNsxtAlbCloud, params)
@@ -107,7 +108,7 @@ resource "vcd_nsxt_alb_controller" "first" {
107108
url = "{{.ControllerUrl}}"
108109
username = "{{.ControllerUsername}}"
109110
password = "{{.ControllerPassword}}"
110-
license_type = "ENTERPRISE"
111+
{{.LicenseType}}
111112
}
112113
113114
data "vcd_nsxt_alb_importable_cloud" "cld" {

vcd/resource_vcd_nsxt_alb_common_test.go

+62-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package vcd
55

66
import (
7+
"fmt"
78
"regexp"
89
"testing"
910

@@ -63,7 +64,7 @@ func TestAccVcdNsxtAlbVdcGroupIntegrationWithoutVdcField(t *testing.T) {
6364

6465
"Tags": "nsxt alb vdcGroup",
6566
}
66-
67+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
6768
testParamsNotEmpty(t, params)
6869

6970
params["FuncName"] = t.Name() + "step1"
@@ -144,6 +145,7 @@ func TestAccVcdNsxtAlbVdcGroupIntegration(t *testing.T) {
144145

145146
"Tags": "nsxt alb vdcGroup",
146147
}
148+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
147149
testParamsNotEmpty(t, params)
148150

149151
params["FuncName"] = t.Name() + "step1"
@@ -263,6 +265,7 @@ resource "vcd_nsxt_alb_settings" "test" {
263265
264266
edge_gateway_id = vcd_nsxt_edgegateway.nsxt-edge.id
265267
is_active = true
268+
{{.SupportedFeatureSet}}
266269
267270
# This dependency is required to make sure that provider part of operations is done
268271
depends_on = [vcd_nsxt_alb_service_engine_group.first]
@@ -283,7 +286,7 @@ resource "vcd_nsxt_alb_controller" "first" {
283286
url = "{{.ControllerUrl}}"
284287
username = "{{.ControllerUsername}}"
285288
password = "{{.ControllerPassword}}"
286-
license_type = "ENTERPRISE"
289+
{{.LicenseType}}
287290
}
288291
289292
resource "vcd_nsxt_alb_cloud" "first" {
@@ -300,6 +303,7 @@ resource "vcd_nsxt_alb_service_engine_group" "first" {
300303
alb_cloud_id = vcd_nsxt_alb_cloud.first.id
301304
importable_service_engine_group_name = "Default-Group"
302305
reservation_model = "DEDICATED"
306+
{{.SupportedFeatureSet}}
303307
}
304308
305309
resource "vcd_nsxt_alb_edgegateway_service_engine_group" "assignment" {
@@ -367,6 +371,7 @@ resource "vcd_nsxt_alb_settings" "test" {
367371
368372
edge_gateway_id = vcd_nsxt_edgegateway.nsxt-edge.id
369373
is_active = true
374+
{{.SupportedFeatureSet}}
370375
371376
# This dependency is required to make sure that provider part of operations is done
372377
depends_on = [vcd_nsxt_alb_service_engine_group.first]
@@ -387,7 +392,7 @@ resource "vcd_nsxt_alb_controller" "first" {
387392
url = "{{.ControllerUrl}}"
388393
username = "{{.ControllerUsername}}"
389394
password = "{{.ControllerPassword}}"
390-
license_type = "ENTERPRISE"
395+
{{.LicenseType}}
391396
}
392397
393398
resource "vcd_nsxt_alb_cloud" "first" {
@@ -404,6 +409,7 @@ resource "vcd_nsxt_alb_service_engine_group" "first" {
404409
alb_cloud_id = vcd_nsxt_alb_cloud.first.id
405410
importable_service_engine_group_name = "Default-Group"
406411
reservation_model = "DEDICATED"
412+
{{.SupportedFeatureSet}}
407413
}
408414
409415
resource "vcd_nsxt_alb_edgegateway_service_engine_group" "assignment" {
@@ -464,3 +470,56 @@ data "vcd_nsxt_alb_pool" "test" {
464470
name = vcd_nsxt_alb_pool.test.name
465471
}
466472
`
473+
474+
// Since v37.0, license_type is no longer used. This function changes Supported Feature Set for License Type if version is lower,
475+
// then returns whether it made the change or not (the version is lower or not).
476+
func changeSupportedFeatureSetIfVersionIsLessThan37(licenseTypeParamKey, supportedFeatureSetParamKey string, params StringMap, isBasicOrStandard bool) bool {
477+
// We choose between premium features or standard ones for SupportedFeatureSet, or their equivalent in the LicenseType
478+
licenseType := "ENTERPRISE"
479+
supportedFeatureSet := "PREMIUM"
480+
if isBasicOrStandard {
481+
licenseType = "BASIC"
482+
supportedFeatureSet = "STANDARD"
483+
}
484+
485+
// Assume we're on newer versions of API, >= 37.0
486+
params[licenseTypeParamKey] = " "
487+
params[supportedFeatureSetParamKey] = fmt.Sprintf("supported_feature_set = \"%s\"", supportedFeatureSet)
488+
489+
// If not, transform the fields
490+
vcdClient := createTemporaryVCDConnection(true)
491+
if vcdClient != nil && vcdClient.Client.APIVCDMaxVersionIs("< 37.0") {
492+
params[licenseTypeParamKey] = fmt.Sprintf("license_type = \"%s\"", licenseType)
493+
params[supportedFeatureSetParamKey] = " "
494+
return true
495+
}
496+
return false
497+
}
498+
499+
// If VCD API version is less than v37.0, checks supported_feature_set is not set.
500+
// Otherwise, checks that the resource contains supported_feature_set value set in the resource.
501+
func checkSupportedFeatureSet(resourceName string, isStandard, isVersionLessThan37 bool) resource.TestCheckFunc {
502+
supportedFeatureSet := "PREMIUM"
503+
if isStandard {
504+
supportedFeatureSet = "STANDARD"
505+
}
506+
507+
if isVersionLessThan37 {
508+
return resource.TestCheckResourceAttr(resourceName, "supported_feature_set", "")
509+
}
510+
return resource.TestCheckResourceAttr(resourceName, "supported_feature_set", supportedFeatureSet)
511+
}
512+
513+
// If VCD API version is less than v37.0, checks that the resource contains license_type value set in the resource.
514+
// Otherwise, it checks nothing.
515+
func checkLicenseType(resourceName string, isBasic, isVersionLessThan37 bool) resource.TestCheckFunc {
516+
licenseType := "ENTERPRISE"
517+
if isBasic {
518+
licenseType = "BASIC"
519+
}
520+
521+
if isVersionLessThan37 {
522+
return resource.TestCheckResourceAttr(resourceName, "license_type", licenseType)
523+
}
524+
return resource.TestCheckResourceAttr(resourceName, "license_type", "")
525+
}

vcd/resource_vcd_nsxt_alb_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ func resourceVcdAlbController() *schema.Resource {
5353
},
5454
"license_type": {
5555
Type: schema.TypeString,
56-
Required: true,
56+
Optional: true, // It's required for versions < 10.4
5757
ValidateFunc: validation.StringInSlice([]string{"BASIC", "ENTERPRISE"}, false),
58-
Description: "NSX-T ALB License type. One of 'BASIC', 'ENTERPRISE'",
58+
Description: "NSX-T ALB License type. One of 'BASIC', 'ENTERPRISE'. Must not be used from VCD 10.4.0 onwards",
5959
},
6060
"version": {
6161
Type: schema.TypeString,

vcd/resource_vcd_nsxt_alb_controller_test.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ func TestAccVcdNsxtAlbController(t *testing.T) {
3030
"ControllerPassword": testConfig.Nsxt.NsxtAlbControllerPassword,
3131
"Tags": "nsxt alb",
3232
}
33+
isVersionLessThan37 := changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
3334
testParamsNotEmpty(t, params)
3435

3536
configText1 := templateFill(testAccVcdNsxtAlbController, params)
3637
debugPrintf("#[DEBUG] CONFIGURATION for step 1: %s", configText1)
3738

3839
params["FuncName"] = t.Name() + "-step2"
40+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, true) // Change to LicenseType Basic
3941
configText2 := templateFill(testAccVcdNsxtAlbControllerStep2, params)
4042
debugPrintf("#[DEBUG] CONFIGURATION for step 2: %s", configText2)
4143

@@ -60,7 +62,7 @@ func TestAccVcdNsxtAlbController(t *testing.T) {
6062
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "description", "first alb controller"),
6163
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "username", testConfig.Nsxt.NsxtAlbControllerUser),
6264
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "password", testConfig.Nsxt.NsxtAlbControllerPassword),
63-
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "license_type", "ENTERPRISE"),
65+
checkLicenseType("vcd_nsxt_alb_controller.first", false, isVersionLessThan37),
6466
),
6567
},
6668
{
@@ -71,7 +73,7 @@ func TestAccVcdNsxtAlbController(t *testing.T) {
7173
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "description", ""),
7274
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "username", testConfig.Nsxt.NsxtAlbControllerUser),
7375
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "password", testConfig.Nsxt.NsxtAlbControllerPassword),
74-
resource.TestCheckResourceAttr("vcd_nsxt_alb_controller.first", "license_type", "BASIC"),
76+
checkLicenseType("vcd_nsxt_alb_controller.first", true, isVersionLessThan37),
7577
),
7678
},
7779
{
@@ -102,7 +104,7 @@ resource "vcd_nsxt_alb_controller" "first" {
102104
url = "{{.ControllerUrl}}"
103105
username = "{{.ControllerUsername}}"
104106
password = "{{.ControllerPassword}}"
105-
license_type = "ENTERPRISE"
107+
{{.LicenseType}}
106108
}
107109
`
108110

@@ -112,7 +114,7 @@ resource "vcd_nsxt_alb_controller" "first" {
112114
url = "{{.ControllerUrl}}"
113115
username = "{{.ControllerUsername}}"
114116
password = "{{.ControllerPassword}}"
115-
license_type = "BASIC"
117+
{{.LicenseType}}
116118
}
117119
`
118120

@@ -123,7 +125,7 @@ resource "vcd_nsxt_alb_controller" "first" {
123125
url = "{{.ControllerUrl}}"
124126
username = "{{.ControllerUsername}}"
125127
password = "{{.ControllerPassword}}"
126-
license_type = "BASIC"
128+
{{.LicenseType}}
127129
}
128130
129131
data "vcd_nsxt_alb_controller" "first" {

vcd/resource_vcd_nsxt_alb_edgegateway_service_engine_group_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ func TestAccVcdNsxtEdgeGatewayServiceEngineGroupDedicated(t *testing.T) {
3232
"EdgeGw": testConfig.Nsxt.EdgeGateway,
3333
"Tags": "nsxt alb",
3434
}
35+
// Set supported_feature_set for ALB Service Engine Group
36+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
37+
// Set supported_feature_set for ALB Settings
38+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSetSettings", params, false)
3539
testParamsNotEmpty(t, params)
3640

3741
params["FuncName"] = t.Name() + "step1"
@@ -130,6 +134,11 @@ func TestAccVcdNsxtEdgeGatewayServiceEngineGroupShared(t *testing.T) {
130134
"EdgeGw": testConfig.Nsxt.EdgeGateway,
131135
"Tags": "nsxt alb",
132136
}
137+
// Set supported_feature_set for ALB Service Engine Group
138+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
139+
// Set supported_feature_set for ALB Settings
140+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSetSettings", params, false)
141+
133142
testParamsNotEmpty(t, params)
134143

135144
params["FuncName"] = t.Name() + "step1"

vcd/resource_vcd_nsxt_alb_pool_test.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func TestAccVcdNsxtAlbPool(t *testing.T) {
5050
"CertPassPhrase1": testConfig.Certificates.Certificate1Pass,
5151
"Tags": "nsxt alb",
5252
}
53+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
5354
testParamsNotEmpty(t, params)
5455

5556
params["FuncName"] = t.Name() + "step1"
@@ -660,6 +661,7 @@ resource "vcd_nsxt_alb_settings" "test" {
660661
661662
edge_gateway_id = data.vcd_nsxt_edgegateway.existing.id
662663
is_active = {{.IsActive}}
664+
{{.SupportedFeatureSet}}
663665
664666
# This dependency is required to make sure that provider part of operations is done
665667
depends_on = [vcd_nsxt_alb_service_engine_group.first]
@@ -683,7 +685,7 @@ resource "vcd_nsxt_alb_controller" "first" {
683685
url = "{{.ControllerUrl}}"
684686
username = "{{.ControllerUsername}}"
685687
password = "{{.ControllerPassword}}"
686-
license_type = "ENTERPRISE"
688+
{{.LicenseType}}
687689
}
688690
689691
resource "vcd_nsxt_alb_cloud" "first" {
@@ -700,6 +702,7 @@ resource "vcd_nsxt_alb_service_engine_group" "first" {
700702
alb_cloud_id = vcd_nsxt_alb_cloud.first.id
701703
importable_service_engine_group_name = "Default-Group"
702704
reservation_model = "{{.ReservationModel}}"
705+
{{.SupportedFeatureSet}}
703706
}
704707
`
705708

@@ -763,6 +766,7 @@ func TestAccVcdNsxtAlbPoolOrgUser(t *testing.T) {
763766
"CertPassPhrase1": testConfig.Certificates.Certificate1Pass,
764767
"Tags": "nsxt alb",
765768
}
769+
changeSupportedFeatureSetIfVersionIsLessThan37("LicenseType", "SupportedFeatureSet", params, false)
766770
testParamsNotEmpty(t, params)
767771

768772
params["FuncName"] = t.Name() + "step1"
@@ -805,7 +809,7 @@ func TestAccVcdNsxtAlbPoolOrgUser(t *testing.T) {
805809
resource.TestMatchResourceAttr("vcd_nsxt_alb_pool.test", "id", regexp.MustCompile(`^urn:vcloud:loadBalancerPool:`)),
806810
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "name", t.Name()),
807811
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "description", ""),
808-
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "algorithm", "LEAST_CONNECTIONS"),
812+
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "algorithm", "LEAST_CONNECTIONS"), // As we're using STANDARD feature set
809813
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "member_count", "0"),
810814
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "up_member_count", "0"),
811815
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "enabled_member_count", "0"),
@@ -879,7 +883,7 @@ func TestAccVcdNsxtAlbPoolOrgUser(t *testing.T) {
879883
resource.TestCheckTypeSetElemNestedAttrs("vcd_nsxt_alb_pool.test", "health_monitor.*", map[string]string{
880884
"type": "TCP",
881885
}),
882-
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "algorithm", "FEWEST_SERVERS"),
886+
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "algorithm", "LEAST_CONNECTIONS"),
883887
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "default_port", "8443"),
884888
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "graceful_timeout_period", "2"),
885889
resource.TestCheckResourceAttr("vcd_nsxt_alb_pool.test", "member_count", "8"),
@@ -945,7 +949,7 @@ resource "vcd_nsxt_alb_pool" "test" {
945949
name = "{{.PoolName}}"
946950
edge_gateway_id = data.vcd_nsxt_edgegateway.existing.id
947951
948-
algorithm = "FEWEST_SERVERS"
952+
algorithm = "LEAST_CONNECTIONS" # As we're using STANDARD feature set
949953
default_port = "8443"
950954
graceful_timeout_period = "2"
951955
passive_monitoring_enabled = false

0 commit comments

Comments
 (0)