Skip to content

Commit 1424fef

Browse files
authored
fix(deps): update DA dependencies (#184)
1 parent ef80ece commit 1424fef

File tree

4 files changed

+51
-42
lines changed

4 files changed

+51
-42
lines changed

ibm_catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@
833833
"name": "deploy-arch-ibm-cloud-logs",
834834
"description": "Create IBM Cloud Logs Instance for storing and analysing platform and application logs .",
835835
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
836-
"version": "v1.6.11",
836+
"version": "v1.6.28",
837837
"flavors": [
838838
"fully-configurable"
839839
],
@@ -971,7 +971,7 @@
971971
"reference_version": true
972972
}
973973
],
974-
"version": "v3.58.2"
974+
"version": "v3.63.1"
975975
}
976976
],
977977
"dependency_version_2": true,

tests/go.mod

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ toolchain go1.25.1
77
require (
88
github.com/gruntwork-io/terratest v0.51.0
99
github.com/stretchr/testify v1.11.1
10-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6
10+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11
1111
)
1212

1313
require (
1414
dario.cat/mergo v1.0.0 // indirect
1515
github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect
1616
github.com/IBM-Cloud/power-go-client v1.12.0 // indirect
1717
github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect
18-
github.com/IBM/go-sdk-core v1.1.0 // indirect
1918
github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect
2019
github.com/IBM/platform-services-go-sdk v0.86.1 // indirect
21-
github.com/IBM/project-go-sdk v0.3.6 // indirect
20+
github.com/IBM/project-go-sdk v0.3.9 // indirect
2221
github.com/IBM/schematics-go-sdk v0.4.0 // indirect
2322
github.com/IBM/vpc-go-sdk v1.0.2 // indirect
2423
github.com/Microsoft/go-winio v0.6.2 // indirect
@@ -30,7 +29,6 @@ require (
3029
github.com/cloudflare/circl v1.6.1 // indirect
3130
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
3231
github.com/davecgh/go-spew v1.1.1 // indirect
33-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
3432
github.com/emirpasic/gods v1.18.1 // indirect
3533
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
3634
github.com/ghodss/yaml v1.0.0 // indirect
@@ -100,7 +98,6 @@ require (
10098
golang.org/x/sys v0.35.0 // indirect
10199
golang.org/x/text v0.28.0 // indirect
102100
golang.org/x/tools v0.35.0 // indirect
103-
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
104101
gopkg.in/warnings.v0 v0.1.2 // indirect
105102
gopkg.in/yaml.v2 v2.4.0 // indirect
106103
gopkg.in/yaml.v3 v3.0.1 // indirect

tests/go.sum

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ github.com/IBM-Cloud/power-go-client v1.12.0 h1:tF9Mq5GLYHebpzQT6IYB89lIxEST1E9t
66
github.com/IBM-Cloud/power-go-client v1.12.0/go.mod h1:SpTK1ttW8bfMNUVQS8qOEuWn2KOkzaCLyzfze8MG1JE=
77
github.com/IBM/cloud-databases-go-sdk v0.8.0 h1:uMFqhnc/roVTzfCaUsJ23eaHKjChhGpM1F7Mpxik0bo=
88
github.com/IBM/cloud-databases-go-sdk v0.8.0/go.mod h1:JYucI1PdwqbAd8XGdDAchxzxRP7bxOh1zUnseovHKsc=
9-
github.com/IBM/go-sdk-core v1.1.0 h1:pV73lZqr9r1xKb3h08c1uNG3AphwoV5KzUzhS+pfEqY=
10-
github.com/IBM/go-sdk-core v1.1.0/go.mod h1:2pcx9YWsIsZ3I7kH+1amiAkXvLTZtAq9kbxsfXilSoY=
119
github.com/IBM/go-sdk-core/v5 v5.9.2/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
1210
github.com/IBM/go-sdk-core/v5 v5.21.0 h1:DUnYhvC4SoC8T84rx5omnhY3+xcQg/Whyoa3mDPIMkk=
1311
github.com/IBM/go-sdk-core/v5 v5.21.0/go.mod h1:Q3BYO6iDA2zweQPDGbNTtqft5tDcEpm6RTuqMlPcvbw=
1412
github.com/IBM/platform-services-go-sdk v0.86.1 h1:ngBpaXvUF3gmLvbU1Z4lX1wowOSYgGoKBEBaR/urt30=
1513
github.com/IBM/platform-services-go-sdk v0.86.1/go.mod h1:aGD045m6I8pfcB77wft8w2cHqWOJjcM3YSSV55BX0Js=
16-
github.com/IBM/project-go-sdk v0.3.6 h1:DRiANKnAePevFsIKSvR89SUaMa2xsd7YKK71Ka1eqKI=
17-
github.com/IBM/project-go-sdk v0.3.6/go.mod h1:FOJM9ihQV3EEAY6YigcWiTNfVCThtdY8bLC/nhQHFvo=
14+
github.com/IBM/project-go-sdk v0.3.9 h1:D/UfMMn+vMQyvYf9EfocV6HrD3HcVpeIVoUSjNKuROo=
15+
github.com/IBM/project-go-sdk v0.3.9/go.mod h1:FOJM9ihQV3EEAY6YigcWiTNfVCThtdY8bLC/nhQHFvo=
1816
github.com/IBM/schematics-go-sdk v0.4.0 h1:x01f/tPquYJYLQzJLGuxWfCbV/EdSMXRikOceNy/JLM=
1917
github.com/IBM/schematics-go-sdk v0.4.0/go.mod h1:Xe7R7xgwmXBHu09w2CbBe8lkWZaYxNQo19bS4dpLrUA=
2018
github.com/IBM/vpc-go-sdk v1.0.2 h1:WhI1Cb8atA8glUdFg0SEUh9u8afjnKHxZAj9onQBi04=
@@ -50,8 +48,6 @@ github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGL
5048
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5149
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
5250
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
53-
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
54-
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
5551
github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o=
5652
github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=
5753
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
@@ -110,11 +106,9 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum
110106
github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ=
111107
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
112108
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
113-
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
114109
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
115110
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
116111
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
117-
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
118112
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
119113
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
120114
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
@@ -199,7 +193,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
199193
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
200194
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
201195
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
202-
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
203196
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
204197
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
205198
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
@@ -302,8 +295,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
302295
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
303296
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
304297
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
305-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6 h1:Tr7AlrQ+s1Nc9VOwB+It8sItnDOXhfXTxKqI2KtdyFA=
306-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6/go.mod h1:YBrRYc+5y5Pr9CXmY35lOqTQdlIjA4x4+3iVObXGOCE=
298+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11 h1:+ATsuqFoHUg/EWpBfF7o8wzxibSan8hG5DJV2NIgrO4=
299+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11/go.mod h1:9QXyZWo0MotbNavJDyeEdpTj1YKoI6IT1wOPJnI1ahI=
307300
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
308301
github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw=
309302
github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk=
@@ -519,8 +512,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
519512
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
520513
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
521514
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
522-
gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
523-
gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M=
524515
gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
525516
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
526517
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=

tests/pr_test.go

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@ package test
33

44
import (
55
"fmt"
6+
"log"
67
"os"
78
"strings"
89
"testing"
910

1011
"math/rand/v2"
1112

12-
"github.com/IBM/go-sdk-core/core"
1313
"github.com/gruntwork-io/terratest/modules/files"
1414
"github.com/gruntwork-io/terratest/modules/logger"
1515
"github.com/gruntwork-io/terratest/modules/random"
1616
"github.com/gruntwork-io/terratest/modules/terraform"
1717
"github.com/stretchr/testify/assert"
1818
"github.com/stretchr/testify/require"
1919
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
20+
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/common"
2021
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
2122
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
2223
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
@@ -26,7 +27,11 @@ const resourceGroup = "geretain-test-observability-agents"
2627
const fullyConfigurableSolutionDir = "solutions/fully-configurable"
2728
const fullyConfigurableSolutionKubeconfigDir = "solutions/fully-configurable/kubeconfig"
2829
const terraformDirLogsAgentIKS = "examples/logs-agent-iks"
30+
const terraformVersion = "terraform_v1.10" // This should match the version in the ibm_catalog.json
31+
// Define a struct with fields that match the structure of the YAML data
32+
const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"
2933

34+
var permanentResources map[string]interface{}
3035
var IgnoreUpdates = []string{
3136
"module.logs_agent.helm_release.logs_agent",
3237
}
@@ -47,6 +52,12 @@ var validRegions = []string{
4752
func TestMain(m *testing.M) {
4853
sharedInfoSvc, _ = cloudinfo.NewCloudInfoServiceFromEnv("TF_VAR_ibmcloud_api_key", cloudinfo.CloudInfoServiceOptions{})
4954

55+
var err error
56+
permanentResources, err = common.LoadMapFromYaml(yamlLocation)
57+
if err != nil {
58+
log.Fatal(err)
59+
}
60+
5061
os.Exit(m.Run())
5162
}
5263

@@ -60,7 +71,8 @@ func setupOptions(t *testing.T, prefix string, terraformDir string) *testhelper.
6071
IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check
6172
List: IgnoreUpdates,
6273
},
63-
CloudInfoService: sharedInfoSvc,
74+
CloudInfoService: sharedInfoSvc,
75+
CheckApplyResultForUpgrade: true,
6476
})
6577

6678
return options
@@ -123,6 +135,7 @@ func TestFullyConfigurableSolution(t *testing.T) {
123135
DeleteWorkspaceOnFail: false,
124136
WaitJobCompleteMinutes: 60,
125137
Region: region,
138+
TerraformVersion: terraformVersion,
126139
})
127140

128141
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
@@ -208,6 +221,8 @@ func TestFullyConfigurableUpgradeSolution(t *testing.T) {
208221
IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check
209222
List: IgnoreUpdates,
210223
},
224+
TerraformVersion: terraformVersion,
225+
CheckApplyResultForUpgrade: true,
211226
})
212227

213228
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
@@ -257,12 +272,6 @@ func TestRunAgentVpcKubernetes(t *testing.T) {
257272

258273
func TestAgentDefaultConfiguration(t *testing.T) {
259274

260-
/*
261-
Skipping this test because auto-approve is not working as expected in projects
262-
Config gets stuck in approved state and doesn't move to deployment
263-
https://github.ibm.com/epx/projects/issues/4814
264-
*/
265-
t.Skip("Skipping because of projects issue")
266275
t.Parallel()
267276

268277
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
@@ -276,28 +285,40 @@ func TestAgentDefaultConfiguration(t *testing.T) {
276285
"deploy-arch-ibm-logs-agent",
277286
"fully-configurable",
278287
map[string]interface{}{
279-
"region": "eu-de",
280-
"prefix": options.Prefix,
281-
"secrets_manager_service_plan": "trial",
288+
"region": "eu-de",
289+
"prefix": options.Prefix,
282290
},
283291
)
284292

285-
/*
286-
Event notifications is manually disabled in this test because event notifications DA creates kms keys and during undeploy the order of key protect and event notifications
287-
is not considered by projects as EN is not a direct dependency of VSI DA. So undeploy fails, because
288-
key protect instance can't be deleted because of active keys created by EN. Hence for now, we don't want to deploy
289-
EN.
290-
291-
Issue has been created for projects team. https://github.ibm.com/epx/projects/issues/4750
292-
Once that is fixed, we can remove the logic to disable EN
293-
*/
294293
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
294+
// use existing secrets manager instance to help prevent hitting trial instance limit in account
295295
{
296-
OfferingName: "deploy-arch-ibm-event-notifications",
296+
OfferingName: "deploy-arch-ibm-secrets-manager",
297297
OfferingFlavor: "fully-configurable",
298-
Enabled: core.BoolPtr(false), // explicitly disabled
298+
Inputs: map[string]interface{}{
299+
"existing_secrets_manager_crn": permanentResources["privateOnlySecMgrCRN"],
300+
"service_plan": "__NULL__", // no plan value needed when using existing SM
301+
"skip_secrets_manager_iam_auth_policy": true, // since using an existing Secrets Manager instance, attempting to re-create auth policy can cause conflicts if the policy already exists
302+
"secret_groups": []string{}, // passing empty array for secret groups as default value is creating general group and it will cause conflicts as we are using an existing SM
303+
},
304+
},
305+
// // Disable target / route creation to help prevent hitting quota in account
306+
{
307+
OfferingName: "deploy-arch-ibm-cloud-monitoring",
308+
OfferingFlavor: "fully-configurable",
309+
Inputs: map[string]interface{}{
310+
"enable_metrics_routing_to_cloud_monitoring": false,
311+
},
312+
},
313+
{
314+
OfferingName: "deploy-arch-ibm-activity-tracker",
315+
OfferingFlavor: "fully-configurable",
316+
Inputs: map[string]interface{}{
317+
"enable_activity_tracker_event_routing_to_cloud_logs": false,
318+
},
299319
},
300320
}
321+
301322
err := options.RunAddonTest()
302323
require.NoError(t, err)
303324
}

0 commit comments

Comments
 (0)