Skip to content

Commit 2b952db

Browse files
authored
fix(deps): update DA dependencies (#1065)
1 parent fd54a04 commit 2b952db

File tree

4 files changed

+50
-54
lines changed

4 files changed

+50
-54
lines changed

ibm_catalog.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@
568568
],
569569
"optional": true,
570570
"on_by_default": false,
571-
"version": "v3.0.7"
571+
"version": "v3.0.23"
572572
},
573573
{
574574
"name": "deploy-arch-ibm-kms",
@@ -609,7 +609,7 @@
609609
],
610610
"optional": true,
611611
"on_by_default": true,
612-
"version": "v5.1.19"
612+
"version": "v5.1.27"
613613
},
614614
{
615615
"name": "deploy-arch-ibm-cos",
@@ -641,7 +641,7 @@
641641
],
642642
"optional": true,
643643
"on_by_default": true,
644-
"version": "v10.2.1"
644+
"version": "v10.2.21"
645645
},
646646
{
647647
"name": "deploy-arch-ibm-cloud-logs",
@@ -651,7 +651,7 @@
651651
"fully-configurable"
652652
],
653653
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
654-
"version": "v1.6.11",
654+
"version": "v1.6.28",
655655
"optional": true,
656656
"on_by_default": true,
657657
"input_mapping": [
@@ -686,7 +686,7 @@
686686
"name": "deploy-arch-ibm-cloud-monitoring",
687687
"description": "Sets up a Cloud Monitoring instance to collect the platform metrics.",
688688
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
689-
"version": "v1.6.4",
689+
"version": "v1.7.2",
690690
"flavors": [
691691
"fully-configurable"
692692
],
@@ -725,7 +725,7 @@
725725
"name": "deploy-arch-ibm-activity-tracker",
726726
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
727727
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
728-
"version": "v1.2.25",
728+
"version": "v1.2.34",
729729
"flavors": [
730730
"fully-configurable"
731731
],
@@ -759,7 +759,7 @@
759759
"name": "deploy-arch-ibm-scc-workload-protection",
760760
"description": "Configure an IBM Cloud Security and Compliance Center Workload Protection instance to help you manage security and compliance for your organization.",
761761
"id": "4322cf44-2289-49aa-a719-dd79e39b14dc-global",
762-
"version": "v1.11.4",
762+
"version": "v1.12.3",
763763
"flavors": [
764764
"fully-configurable"
765765
],

tests/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ go 1.24.0
55
toolchain go1.25.0
66

77
require (
8+
github.com/IBM/go-sdk-core/v5 v5.21.0
89
github.com/gruntwork-io/terratest v0.50.0
910
github.com/stretchr/testify v1.11.1
10-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.3
11+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9
1112
)
1213

1314
require (
1415
dario.cat/mergo v1.0.0 // indirect
1516
github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect
1617
github.com/IBM-Cloud/power-go-client v1.12.0 // indirect
1718
github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect
18-
github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect
1919
github.com/IBM/platform-services-go-sdk v0.86.1 // indirect
2020
github.com/IBM/project-go-sdk v0.3.6 // indirect
2121
github.com/IBM/schematics-go-sdk v0.4.0 // indirect
@@ -93,7 +93,7 @@ require (
9393
golang.org/x/crypto v0.41.0 // indirect
9494
golang.org/x/mod v0.26.0 // indirect
9595
golang.org/x/net v0.42.0 // indirect
96-
golang.org/x/sync v0.16.0 // indirect
96+
golang.org/x/sync v0.17.0 // indirect
9797
golang.org/x/sys v0.35.0 // indirect
9898
golang.org/x/text v0.28.0 // indirect
9999
golang.org/x/tools v0.35.0 // indirect

tests/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
295295
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
296296
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
297297
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
298-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.3 h1:eR7/W4+SmqfDfeD33ZVmtKrtM+KtcbAbURfjKAnXyic=
299-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.3/go.mod h1:9Thq3InVLYHEtKIVABm8e1d7jvpIQqlKCJ8/d5wH6DY=
298+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9 h1:ntigNnXy4Ut6eVMfBUjQ5yoIZR5Rt419+pwfle4MO5c=
299+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9/go.mod h1:YBrRYc+5y5Pr9CXmY35lOqTQdlIjA4x4+3iVObXGOCE=
300300
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
301301
github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw=
302302
github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk=
@@ -396,8 +396,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
396396
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
397397
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
398398
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
399-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
400-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
399+
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
400+
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
401401
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
402402
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
403403
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

tests/pr_test.go

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88
"testing"
99

10+
"github.com/IBM/go-sdk-core/v5/core"
1011
"github.com/gruntwork-io/terratest/modules/files"
1112
"github.com/gruntwork-io/terratest/modules/logger"
1213
"github.com/gruntwork-io/terratest/modules/random"
@@ -21,6 +22,9 @@ import (
2122
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
2223
)
2324

25+
/*
26+
Global variables
27+
*/
2428
const basicExampleTerraformDir = "examples/basic"
2529
const customSecurityGroupExampleTerraformDir = "examples/custom_security_group"
2630
const defaultExampleTerraformDir = "examples/default"
@@ -32,9 +36,8 @@ const noprefixExampleTerraformDir = "examples/no-prefix"
3236
const vpcWithDnsExampleTerraformDir = "examples/vpc-with-dns"
3337
const fullyConfigFlavorDir = "solutions/fully-configurable"
3438
const resourceGroup = "geretain-test-resources"
35-
36-
// Define a struct with fields that match the structure of the YAML data
3739
const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"
40+
const terraformVersion = "terraform_v1.10" // This should match the version in the ibm_catalog.json
3841

3942
var permanentResources map[string]interface{}
4043

@@ -198,18 +201,10 @@ func TestRunVpcWithDnsExample(t *testing.T) {
198201
func TestFullyConfigurable(t *testing.T) {
199202
t.Parallel()
200203

201-
// Verify ibmcloud_api_key variable is set
202-
checkVariable := "TF_VAR_ibmcloud_api_key"
203-
val, present := os.LookupEnv(checkVariable)
204-
require.True(t, present, checkVariable+" environment variable not set")
205-
require.NotEqual(t, "", val, checkVariable+" environment variable is empty")
206-
207-
prefix := "vpc-da"
208-
209204
options := testschematic.TestSchematicOptionsDefault(&testschematic.TestSchematicOptions{
210205
Testing: t,
211206
Region: "eu-de",
212-
Prefix: prefix,
207+
Prefix: "vpc-da",
213208
TarIncludePatterns: []string{
214209
"*.tf",
215210
"dynamic_values/*.tf",
@@ -220,6 +215,7 @@ func TestFullyConfigurable(t *testing.T) {
220215
Tags: []string{"vpc-da-test"},
221216
DeleteWorkspaceOnFail: false,
222217
WaitJobCompleteMinutes: 120,
218+
TerraformVersion: terraformVersion,
223219
})
224220

225221
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
@@ -291,7 +287,7 @@ func TestFullyConfigurableWithFlowLogs(t *testing.T) {
291287
require.True(t, present, checkVariable+" environment variable not set")
292288
require.NotEqual(t, "", val, checkVariable+" environment variable is empty")
293289

294-
prefix := "vpc-da-fl"
290+
prefix := fmt.Sprintf("vpc-f-%s", strings.ToLower(random.UniqueId()))
295291
existingTerraformOptions := setupTerraform(t, prefix, "./existing-resources")
296292

297293
options := testschematic.TestSchematicOptionsDefault(&testschematic.TestSchematicOptions{
@@ -308,6 +304,7 @@ func TestFullyConfigurableWithFlowLogs(t *testing.T) {
308304
Tags: []string{"vpc-da-test"},
309305
DeleteWorkspaceOnFail: false,
310306
WaitJobCompleteMinutes: 120,
307+
TerraformVersion: terraformVersion,
311308
})
312309

313310
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
@@ -322,7 +319,7 @@ func TestFullyConfigurableWithFlowLogs(t *testing.T) {
322319
{Name: "kms_encryption_enabled_bucket", Value: "true", DataType: "bool"},
323320
{Name: "existing_kms_instance_crn", Value: permanentResources["hpcs_south_crn"], DataType: "string"},
324321
{Name: "vpe_gateway_cloud_services", Value: []map[string]string{{"service_name": "kms"}, {"service_name": "cloud-object-storage"}}, DataType: "list(object{})"},
325-
{Name: "vpe_gateway_cloud_service_by_crn", Value: []map[string]string{{"crn": terraform.Output(t, existingTerraformOptions, "postgresql_db_crn")}}, DataType: "list(object{})"},
322+
{Name: "vpe_gateway_cloud_service_by_crn", Value: []map[string]string{{"crn": terraform.Output(t, existingTerraformOptions, "postgresql_db_crn"), "vpe_name": "pg"}}, DataType: "list(object{})"},
326323
{Name: "vpn_gateways", Value: []map[string]string{{"name": options.Prefix + "-vpn", "subnet_name": "subnet-c"}}, DataType: "list(object{})"},
327324
}
328325

@@ -340,7 +337,7 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) {
340337
require.True(t, present, checkVariable+" environment variable not set")
341338
require.NotEqual(t, "", val, checkVariable+" environment variable is empty")
342339

343-
prefix := "vpc-upg"
340+
prefix := fmt.Sprintf("vpc-u-%s", strings.ToLower(random.UniqueId()))
344341
existingTerraformOptions := setupTerraform(t, prefix, "./existing-resources")
345342

346343
options := testschematic.TestSchematicOptionsDefault(&testschematic.TestSchematicOptions{
@@ -353,10 +350,12 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) {
353350
"dynamic_values/config_modules/*/*.tf",
354351
fullyConfigFlavorDir + "/*.tf",
355352
},
356-
TemplateFolder: fullyConfigFlavorDir,
357-
Tags: []string{"vpc-da-test"},
358-
DeleteWorkspaceOnFail: false,
359-
WaitJobCompleteMinutes: 120,
353+
TemplateFolder: fullyConfigFlavorDir,
354+
Tags: []string{"vpc-da-test"},
355+
DeleteWorkspaceOnFail: false,
356+
WaitJobCompleteMinutes: 120,
357+
CheckApplyResultForUpgrade: true,
358+
TerraformVersion: terraformVersion,
360359
})
361360

362361
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
@@ -371,7 +370,7 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) {
371370
{Name: "kms_encryption_enabled_bucket", Value: "true", DataType: "bool"},
372371
{Name: "existing_kms_instance_crn", Value: permanentResources["hpcs_south_crn"], DataType: "string"},
373372
{Name: "vpe_gateway_cloud_services", Value: []map[string]string{{"service_name": "kms"}, {"service_name": "cloud-object-storage"}}, DataType: "list(object{})"},
374-
{Name: "vpe_gateway_cloud_service_by_crn", Value: []map[string]string{{"crn": terraform.Output(t, existingTerraformOptions, "postgresql_db_crn")}}, DataType: "list(object{})"},
373+
{Name: "vpe_gateway_cloud_service_by_crn", Value: []map[string]string{{"crn": terraform.Output(t, existingTerraformOptions, "postgresql_db_crn"), "vpe_name": "pg"}}, DataType: "list(object{})"},
375374
{Name: "vpn_gateways", Value: []map[string]string{{"name": options.Prefix + "-vpn", "subnet_name": "subnet-c"}}, DataType: "list(object{})"},
376375
}
377376

@@ -409,7 +408,7 @@ func TestVpcAddonDefaultConfiguration(t *testing.T) {
409408

410409
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
411410
Testing: t,
412-
Prefix: "vpc-def",
411+
Prefix: "vpc-ad",
413412
ResourceGroup: resourceGroup,
414413
QuietMode: false, // Suppress logs except on failure
415414
})
@@ -424,29 +423,26 @@ func TestVpcAddonDefaultConfiguration(t *testing.T) {
424423
},
425424
)
426425

427-
err := options.RunAddonTest()
428-
require.NoError(t, err)
429-
}
430-
431-
// TestDependencyPermutations runs dependency permutations for landing zone vpc and all its dependencies
432-
func TestVpcDependencyPermutations(t *testing.T) {
433-
434-
t.Skip("Skipping dependency permutations until the test is fixed")
435-
t.Parallel()
436-
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
437-
Testing: t,
438-
Prefix: "vpc-per",
439-
AddonConfig: cloudinfo.AddonConfig{
440-
OfferingName: "deploy-arch-ibm-slz-vpc",
426+
// Disable target / route creation to prevent hitting quota in account
427+
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
428+
{
429+
OfferingName: "deploy-arch-ibm-cloud-monitoring",
441430
OfferingFlavor: "fully-configurable",
442431
Inputs: map[string]interface{}{
443-
"prefix": "vpc-per",
444-
"region": "us-south",
445-
"existing_cos_instance_crn": permanentResources["general_test_storage_cos_instance_crn"],
432+
"enable_metrics_routing_to_cloud_monitoring": false,
446433
},
434+
Enabled: core.BoolPtr(true),
447435
},
448-
})
436+
{
437+
OfferingName: "deploy-arch-ibm-activity-tracker",
438+
OfferingFlavor: "fully-configurable",
439+
Inputs: map[string]interface{}{
440+
"enable_activity_tracker_event_routing_to_cloud_logs": false,
441+
},
442+
Enabled: core.BoolPtr(true),
443+
},
444+
}
449445

450-
err := options.RunAddonPermutationTest()
451-
assert.NoError(t, err, "Dependency permutation test should not fail")
446+
err := options.RunAddonTest()
447+
require.NoError(t, err)
452448
}

0 commit comments

Comments
 (0)