diff --git a/.secrets.baseline b/.secrets.baseline index 2b8a362e..de91ae34 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "go.sum|^.secrets.baseline$", "lines": null }, - "generated_at": "2025-10-04T04:07:21Z", + "generated_at": "2025-10-07T09:32:06Z", "plugins_used": [ { "name": "AWSKeyDetector" diff --git a/ibm_catalog.json b/ibm_catalog.json index 72459ddc..f42b6fc4 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -353,7 +353,7 @@ ], "optional": true, "on_by_default": false, - "version": "v3.0.7" + "version": "v3.0.23" }, { "name": "deploy-arch-ibm-cloud-monitoring", @@ -386,7 +386,7 @@ ], "optional": true, "on_by_default": true, - "version": "v1.6.4" + "version": "v1.7.2" }, { "name": "deploy-arch-ibm-cloud-logs", @@ -415,7 +415,7 @@ ], "optional": true, "on_by_default": true, - "version": "v1.6.11" + "version": "v1.6.28" }, { "name": "deploy-arch-ibm-activity-tracker", @@ -439,7 +439,7 @@ ], "optional": true, "on_by_default": true, - "version": "v1.2.25" + "version": "v1.2.34" }, { "name": "deploy-arch-ibm-scc-workload-protection", @@ -463,7 +463,7 @@ ], "optional": true, "on_by_default": true, - "version": "v1.11.4" + "version": "v1.12.3" }, { "name": "deploy-arch-ibm-secrets-manager", @@ -492,7 +492,7 @@ ], "optional": true, "on_by_default": false, - "version": "v2.8.6" + "version": "v2.10.0" } ], "dependency_version_2": true, @@ -803,13 +803,13 @@ ], "optional": true, "on_by_default": false, - "version": "v3.0.7" + "version": "v3.0.23" }, { "name": "deploy-arch-ibm-kms", "description": "Enable Cloud Automation for Key Protect when you want services to use your own managed encryption keys for encrypting the payload data. If disabled, it will fall back on IBM Cloud's default service-managed encryption.", "id": "2cad4789-fa90-4886-9c9e-857081c273ee-global", - "version": "v5.1.4", + "version": "v5.1.19", "flavors": [ "fully-configurable" ], @@ -842,14 +842,18 @@ ] }, { - "name": "deploy-arch-ibm-observability", - "description": "Enable to provision and configure IBM Cloud Logs, Cloud Monitoring, Metrics routing and Activity Tracker event routing for analysing logs and metrics generated by the Eventstreams instance.", + "name": "deploy-arch-ibm-cloud-monitoring", + "description": "Configure IBM Cloud Monitoring to collect the platform metrics.", "flavors": [ - "instances" + "fully-configurable" ], - "id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global", + "id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global", "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "input_mapping": [ + { + "dependency_output": "cloud_monitoring_crn", + "version_input": "existing_monitoring_crn" + }, { "dependency_input": "prefix", "version_input": "prefix", @@ -864,6 +868,30 @@ "dependency_input": "enable_platform_metrics", "version_input": "enable_platform_metrics", "reference_version": true + } + ], + "optional": true, + "on_by_default": true, + "version": "v1.7.2" + }, + { + "name": "deploy-arch-ibm-cloud-logs", + "description": "Configure IBM Cloud Logs to analyse the platform logs.", + "flavors": [ + "fully-configurable" + ], + "id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global", + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "input_mapping": [ + { + "dependency_input": "prefix", + "version_input": "prefix", + "reference_version": true + }, + { + "dependency_input": "region", + "version_input": "region", + "reference_version": true }, { "dependency_input": "logs_routing_tenant_regions", @@ -873,7 +901,31 @@ ], "optional": true, "on_by_default": true, - "version": "v3.0.3" + "version": "v1.6.28" + }, + { + "name": "deploy-arch-ibm-activity-tracker", + "description": "Configure Activity Tracker Event Routing to route the auditing events.", + "flavors": [ + "fully-configurable" + ], + "id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global", + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "input_mapping": [ + { + "dependency_input": "prefix", + "version_input": "prefix", + "reference_version": true + }, + { + "dependency_input": "region", + "version_input": "region", + "reference_version": true + } + ], + "optional": true, + "on_by_default": true, + "version": "v1.2.34" }, { "name": "deploy-arch-ibm-secrets-manager", @@ -897,7 +949,7 @@ ], "optional": true, "on_by_default": true, - "version": "v2.6.1" + "version": "v2.10.0" } ], "dependency_version_2": true, diff --git a/tests/go.mod b/tests/go.mod index d34bce26..6ec4a316 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -5,6 +5,7 @@ go 1.24.0 toolchain go1.25.2 require ( + github.com/IBM/go-sdk-core v1.1.0 github.com/stretchr/testify v1.11.1 github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.12 ) @@ -28,6 +29,7 @@ require ( github.com/cloudflare/circl v1.6.1 // indirect github.com/cyphar/filepath-securejoin v0.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/gabriel-vasile/mimetype v1.4.9 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -98,6 +100,7 @@ require ( golang.org/x/sys v0.37.0 // indirect golang.org/x/text v0.30.0 // indirect golang.org/x/tools v0.37.0 // indirect + gopkg.in/go-playground/validator.v9 v9.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/tests/go.sum b/tests/go.sum index 87a27e0a..d6e4788e 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -6,6 +6,8 @@ github.com/IBM-Cloud/power-go-client v1.13.0 h1:TqxPlkJe0VkNdV9hYOD5NRepxEFhhyKX github.com/IBM-Cloud/power-go-client v1.13.0/go.mod h1:SpTK1ttW8bfMNUVQS8qOEuWn2KOkzaCLyzfze8MG1JE= github.com/IBM/cloud-databases-go-sdk v0.8.1 h1:ULQ5L8V/9z79/qS185LqbIK2LD4kMtk3Hdhp4lFMVcw= github.com/IBM/cloud-databases-go-sdk v0.8.1/go.mod h1:JYucI1PdwqbAd8XGdDAchxzxRP7bxOh1zUnseovHKsc= +github.com/IBM/go-sdk-core v1.1.0 h1:pV73lZqr9r1xKb3h08c1uNG3AphwoV5KzUzhS+pfEqY= +github.com/IBM/go-sdk-core v1.1.0/go.mod h1:2pcx9YWsIsZ3I7kH+1amiAkXvLTZtAq9kbxsfXilSoY= github.com/IBM/go-sdk-core/v5 v5.9.2/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE= github.com/IBM/go-sdk-core/v5 v5.21.0 h1:DUnYhvC4SoC8T84rx5omnhY3+xcQg/Whyoa3mDPIMkk= github.com/IBM/go-sdk-core/v5 v5.21.0/go.mod h1:Q3BYO6iDA2zweQPDGbNTtqft5tDcEpm6RTuqMlPcvbw= @@ -48,6 +50,8 @@ github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGL github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -106,9 +110,11 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= @@ -195,6 +201,7 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= @@ -512,7 +519,10 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/tests/pr_test.go b/tests/pr_test.go index 4bee4e70..e222dde0 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -6,8 +6,8 @@ import ( "log" "os" "testing" - "time" + "github.com/IBM/go-sdk-core/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo" @@ -20,6 +20,7 @@ import ( const completeExampleTerraformDir = "examples/complete" const quickstartTerraformDir = "solutions/quickstart" const fsCloudTerraformDir = "examples/fscloud" +const terraformVersion = "terraform_v1.10" // This should match the version in the ibm_catalog.json // Use existing group for tests const resourceGroup = "geretain-test-event-streams" @@ -65,6 +66,7 @@ func setupQuickstartOptions(t *testing.T, prefix string) *testschematic.TestSche Tags: []string{"test-schematic"}, DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 360, + TerraformVersion: terraformVersion, }) serviceCredentialSecrets := []map[string]interface{}{ @@ -118,6 +120,8 @@ func TestRunQuickstartUpgradeSchematics(t *testing.T) { t.Parallel() options := setupQuickstartOptions(t, "es-qs-upg") + options.CheckApplyResultForUpgrade = true + err := options.RunSchematicUpgradeTest() if !options.UpgradeTestSkipped { assert.Nil(t, err, "This should not have errored") @@ -144,32 +148,38 @@ func TestEventStreamsDefaultConfiguration(t *testing.T) { }, ) - err := options.RunAddonTest() - require.NoError(t, err) -} - -// TestDependencyPermutations runs dependency permutations for Event Streams and all its dependencies -func TestDependencyPermutations(t *testing.T) { - t.Skip("Skipping dependency permutations") - t.Parallel() - - options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{ - Testing: t, - Prefix: "es-perm", - StaggerDelay: testaddons.StaggerDelay(20 * time.Second), // 20s delay between batches - StaggerBatchSize: testaddons.StaggerBatchSize(4), // 4 tests per batch - WithinBatchDelay: testaddons.WithinBatchDelay(16 * time.Second), // 8s delay within batch - AddonConfig: cloudinfo.AddonConfig{ - OfferingName: "deploy-arch-ibm-event-streams", - OfferingFlavor: "quickstart", + // Disable target / route creation to prevent hitting quota in account + // Use existing SM instance to prevent hitting quota in account + options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{ + { + OfferingName: "deploy-arch-ibm-cloud-monitoring", + OfferingFlavor: "fully-configurable", Inputs: map[string]interface{}{ - "prefix": "es-perm", - "existing_resource_group_name": resourceGroup, - "service_plan": "standard", + "enable_metrics_routing_to_cloud_monitoring": false, }, + Enabled: core.BoolPtr(true), }, - }) + { + OfferingName: "deploy-arch-ibm-activity-tracker", + OfferingFlavor: "fully-configurable", + Inputs: map[string]interface{}{ + "enable_activity_tracker_event_routing_to_cloud_logs": false, + }, + Enabled: core.BoolPtr(true), + }, + { + OfferingName: "deploy-arch-ibm-secrets-manager", + OfferingFlavor: "fully-configurable", + Inputs: map[string]interface{}{ + "existing_secrets_manager_crn": permanentResources["privateOnlySecMgrCRN"], + "service_plan": "__NULL__", // no plan value needed when using existing SM + "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 + "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 + }, + Enabled: core.BoolPtr(true), + }, + } - err := options.RunAddonPermutationTest() - assert.NoError(t, err, "Dependency permutation test should not fail") + err := options.RunAddonTest() + require.NoError(t, err) }