From b622e75172449881a80eb2b9c4d2c219f0f1bb20 Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Sat, 20 Sep 2025 13:59:12 +0530 Subject: [PATCH 1/8] added addon test --- ibm_catalog.json | 81 ++++++++++++++++++++++++++++--- solutions/quickstart/main.tf | 6 +-- solutions/quickstart/variables.tf | 6 +-- tests/go.mod | 3 ++ tests/go.sum | 9 ++++ tests/pr_test.go | 54 +++++++++++++-------- 6 files changed, 126 insertions(+), 33 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index b0dd321..e275160 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -165,7 +165,7 @@ ] }, { - "key": "ocp_version", + "key": "openshift_version", "required": true, "options": [ { @@ -518,7 +518,7 @@ } }, { - "key": "ocp_version", + "key": "openshift_version", "required": true, "virtual": true, "type": "string", @@ -620,6 +620,60 @@ }, "virtual": true }, + { + "key": "allow_public_access_to_cluster", + "type": "boolean", + "required": true, + "virtual": true, + "default_value": false, + "options": [ + { + "displayname": "true", + "value": "true" + }, + { + "displayname": "false", + "value": "false" + } + ], + "description": "When set to `true`, public endpoint will be enabled for the cluster which will allow access to master node of the cluster from outside the VPC network." + }, + { + "key": "allow_outbound_traffic", + "type": "boolean", + "required": true, + "virtual": true, + "default_value": false, + "options": [ + { + "displayname": "true", + "value": "true" + }, + { + "displayname": "false", + "value": "false" + } + ], + "description": "Set to true to allow public outbound access from the cluster workers." + }, + { + "key": "secrets_manager_service_plan", + "type": "string", + "required": true, + "virtual": true, + "default_value": "standard", + "options": [ + { + "displayname": "Standard", + "value": "standard" + }, + { + "displayname": "Trial", + "value": "trial" + } + ], + "description": "The pricing plan to use when provisioning a Secrets Manager instance for centrally managing ingress certificates for OpenShift cluster. Possible values: `standard`, `trial`. You can create only one Trial instance of Secrets Manager per account. Before you can create a new Trial instance, you must delete the existing Trial instance and its reclamation. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-create-instance&interface=ui#upgrade-instance-standard)." + }, { "key": "vpc_file_default_storage_class" }, @@ -687,7 +741,7 @@ ], "dependencies": [ { - "name": "deploy-arch-ibm-ocp-vpc", + "name": "deploy-arch-ibm-slz-ocp", "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "flavors": [ "fully-configurable" @@ -725,8 +779,8 @@ "reference_version": true }, { - "dependency_input": "ocp_version", - "version_input": "ocp_version", + "dependency_input": "openshift_version", + "version_input": "openshift_version", "reference_version": true }, { @@ -755,11 +809,22 @@ "reference_version": true }, { - "dependency_input": "disable_outbound_traffic_protection", - "value": true + "dependency_input": "allow_public_access_to_cluster", + "version_input": "allow_public_access_to_cluster", + "reference_version": true + }, + { + "dependency_input": "allow_outbound_traffic", + "version_input": "allow_outbound_traffic", + "reference_version": true + }, + { + "dependency_input": "secrets_manager_service_plan", + "version_input": "secrets_manager_service_plan", + "reference_version": true } ], - "version": "v3.55.2" + "version": "v3.58.2" } ], "dependency_version_2": true, diff --git a/solutions/quickstart/main.tf b/solutions/quickstart/main.tf index 12e70d9..e4af453 100644 --- a/solutions/quickstart/main.tf +++ b/solutions/quickstart/main.tf @@ -86,13 +86,13 @@ locals { addons = merge({ for key, value in var.addons : key => value != null ? { - version = lookup(value, "version", null) == null && key == "openshift-data-foundation" ? "${var.ocp_version}.0" : lookup(value, "version", null) + version = lookup(value, "version", null) == null && key == "openshift-data-foundation" ? "${var.openshift_version}.0" : lookup(value, "version", null) parameters_json = lookup(value, "parameters_json", null) } : null }, # if the user overrides the values for the addons lookup(var.addons, "openshift-data-foundation", null) == null ? { openshift-data-foundation = { - version = "${var.ocp_version}.0" + version = "${var.openshift_version}.0" parameters_json = "{\"osdStorageClassName\":\"localblock\",\"odfDeploy\":\"true\",\"autoDiscoverDevices\":\"true\"}" } } : {}, lookup(var.addons, "vpc-file-csi-driver", null) == null ? { vpc-file-csi-driver = { @@ -110,7 +110,7 @@ module "ocp_base" { force_delete_storage = true vpc_id = module.vpc.vpc_id vpc_subnets = module.vpc.subnet_detail_map - ocp_version = var.ocp_version + ocp_version = var.openshift_version worker_pools = local.worker_pools access_tags = var.access_tags ocp_entitlement = var.ocp_entitlement diff --git a/solutions/quickstart/variables.tf b/solutions/quickstart/variables.tf index 38e8ebd..815b30d 100644 --- a/solutions/quickstart/variables.tf +++ b/solutions/quickstart/variables.tf @@ -94,14 +94,14 @@ variable "cluster_name" { default = "openshift" } -variable "ocp_version" { +variable "openshift_version" { type = string description = "Version of the OCP cluster to provision." default = "4.18" validation { - condition = tonumber(var.ocp_version) >= 4.17 - error_message = "To install Red Hat OpenShift Virtualization, `ocp_version` should be equal to or higher than `4.17`." + condition = tonumber(var.openshift_version) >= 4.17 + error_message = "To install Red Hat OpenShift Virtualization, `openshift_version` should be equal to or higher than `4.17`." } } diff --git a/tests/go.mod b/tests/go.mod index a239e0c..5551671 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -15,6 +15,7 @@ require ( github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect github.com/IBM-Cloud/power-go-client v1.12.0 // indirect github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect + github.com/IBM/go-sdk-core v1.1.0 // indirect github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect github.com/IBM/platform-services-go-sdk v0.86.1 // indirect github.com/IBM/project-go-sdk v0.3.6 // indirect @@ -29,6 +30,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 @@ -97,6 +99,7 @@ require ( golang.org/x/sys v0.35.0 // indirect golang.org/x/text v0.28.0 // indirect golang.org/x/tools v0.35.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 b0b26b3..52d261d 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -6,6 +6,8 @@ github.com/IBM-Cloud/power-go-client v1.12.0 h1:tF9Mq5GLYHebpzQT6IYB89lIxEST1E9t github.com/IBM-Cloud/power-go-client v1.12.0/go.mod h1:SpTK1ttW8bfMNUVQS8qOEuWn2KOkzaCLyzfze8MG1JE= github.com/IBM/cloud-databases-go-sdk v0.8.0 h1:uMFqhnc/roVTzfCaUsJ23eaHKjChhGpM1F7Mpxik0bo= github.com/IBM/cloud-databases-go-sdk v0.8.0/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= @@ -193,6 +199,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= @@ -510,6 +517,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN 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/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 bd59e60..582dde3 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -10,6 +10,7 @@ import ( "strings" "testing" + "github.com/IBM/go-sdk-core/core" "github.com/gruntwork-io/terratest/modules/files" "github.com/gruntwork-io/terratest/modules/logger" "github.com/gruntwork-io/terratest/modules/random" @@ -269,27 +270,42 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) { cleanupTerraform(t, existingTerraformOptions, prefix) } -// TestDependencyPermutations runs dependency permutations for the Virtualization and all its dependencies -func TestDependencyPermutations(t *testing.T) { - - // Provision resources first - prefix := fmt.Sprintf("ocp-vi-%s", strings.ToLower(random.UniqueId())) - existingTerraformOptions := setupTerraform(t, prefix, "./resources") +func TestAddonConfigurations(t *testing.T) { + t.Parallel() options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{ - Testing: t, - Prefix: "virt", - AddonConfig: cloudinfo.AddonConfig{ - OfferingName: "deploy-arch-ibm-ocp-virtualization", - OfferingFlavor: "fully-configurable", - Inputs: map[string]interface{}{ - "prefix": prefix, - "cluster_id": terraform.Output(t, existingTerraformOptions, "workload_cluster_id"), - "cluster_resource_group_id": terraform.Output(t, existingTerraformOptions, "cluster_resource_group_id"), - }, - }, + Testing: t, + Prefix: "virt-def", + QuietMode: false, }) - err := options.RunAddonPermutationTest() - assert.NoError(t, err, "Dependency permutation test should not fail") + options.AddonConfig = cloudinfo.NewAddonConfigTerraform( + options.Prefix, + "deploy-arch-ibm-ocp-virtualization", + "fully-configurable", + map[string]interface{}{ + "region": "eu-de", + "prefix": options.Prefix, + "secrets_manager_service_plan": "trial", + }, + ) + + /* + 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 + is not considered by projects as EN is not a direct dependency of VSI DA. So undeploy fails, because + key protect instance can't be deleted because of active keys created by EN. Hence for now, we don't want to deploy + EN. + + Issue has been created for projects team. https://github.ibm.com/epx/projects/issues/4750 + Once that is fixed, we can remove the logic to disable EN + */ + options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{ + { + OfferingName: "deploy-arch-ibm-event-notifications", + OfferingFlavor: "fully-configurable", + Enabled: core.BoolPtr(false), // explicitly disabled + }, + } + err := options.RunAddonTest() + require.NoError(t, err) } From 430898b0940309057e539dd453457d8c26409d4d Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Sat, 20 Sep 2025 14:12:12 +0530 Subject: [PATCH 2/8] updated catalog json --- ibm_catalog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index e275160..ada9a62 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -742,11 +742,11 @@ "dependencies": [ { "name": "deploy-arch-ibm-slz-ocp", - "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "catalog_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc", "flavors": [ "fully-configurable" ], - "id": "1728a4fd-f561-4cf9-82ef-2b1eeb5da1a8-global", + "id": "95fccffc-ae3b-42df-b6d9-80be5914d852-global", "optional": true, "on_by_default": true, "input_mapping": [ From 3d96c7e5f6000699cd72cddc2c464e935e728fee Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Sat, 20 Sep 2025 15:01:11 +0530 Subject: [PATCH 3/8] updated common-dev-assets --- common-dev-assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-dev-assets b/common-dev-assets index 47c0edb..84e744a 160000 --- a/common-dev-assets +++ b/common-dev-assets @@ -1 +1 @@ -Subproject commit 47c0edbc6d669874511116e4cb645097d10561b9 +Subproject commit 84e744a27f774dac276e9381db01b6fe378c0af3 From 9e0081ae671f141055f79821330616f98315f0d3 Mon Sep 17 00:00:00 2001 From: Vipin Kumar <77929205+Vipin654@users.noreply.github.com> Date: Sun, 21 Sep 2025 03:27:20 +0530 Subject: [PATCH 4/8] Update ibm_catalog.json --- ibm_catalog.json | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index ada9a62..706f581 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -638,24 +638,6 @@ ], "description": "When set to `true`, public endpoint will be enabled for the cluster which will allow access to master node of the cluster from outside the VPC network." }, - { - "key": "allow_outbound_traffic", - "type": "boolean", - "required": true, - "virtual": true, - "default_value": false, - "options": [ - { - "displayname": "true", - "value": "true" - }, - { - "displayname": "false", - "value": "false" - } - ], - "description": "Set to true to allow public outbound access from the cluster workers." - }, { "key": "secrets_manager_service_plan", "type": "string", @@ -815,8 +797,7 @@ }, { "dependency_input": "allow_outbound_traffic", - "version_input": "allow_outbound_traffic", - "reference_version": true + "value": "true" }, { "dependency_input": "secrets_manager_service_plan", From 5885fba2a1605591ccd98c4fc192ddd1787b7a64 Mon Sep 17 00:00:00 2001 From: Vipin Kumar <77929205+Vipin654@users.noreply.github.com> Date: Tue, 23 Sep 2025 00:18:34 +0530 Subject: [PATCH 5/8] Update ibm_catalog.json --- ibm_catalog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index 706f581..2859d8b 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -625,7 +625,7 @@ "type": "boolean", "required": true, "virtual": true, - "default_value": false, + "default_value": true, "options": [ { "displayname": "true", From 5c609f67e32bb4062b55c58a02af9c7b282150f0 Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Thu, 9 Oct 2025 22:22:31 +0530 Subject: [PATCH 6/8] updated test --- ibm_catalog.json | 22 ++-------------------- tests/go.mod | 11 ++++++----- tests/go.sum | 23 +++++++++++++---------- tests/pr_test.go | 42 ++++++++++++++++++++++++++++-------------- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index ba7275c..94bc272 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -687,24 +687,6 @@ }, "virtual": true }, - { - "key": "allow_public_access_to_cluster", - "type": "boolean", - "required": true, - "virtual": true, - "default_value": true, - "options": [ - { - "displayname": "true", - "value": "true" - }, - { - "displayname": "false", - "value": "false" - } - ], - "description": "When set to `true`, public endpoint will be enabled for the cluster which will allow access to master node of the cluster from outside the VPC network." - }, { "key": "secrets_manager_service_plan", "type": "string", @@ -926,7 +908,7 @@ "value": true }, { - "dependency_input": "allow_public_access_to_cluster", + "dependency_input": "allow_public_access_to_cluster_management", "value": true }, { @@ -950,7 +932,7 @@ "reference_version": true } ], - "version": "v3.58.2" + "version": "v3.63.1" } ], "dependency_version_2": true, diff --git a/tests/go.mod b/tests/go.mod index 5551671..70cbb9c 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -5,9 +5,10 @@ go 1.24.0 toolchain go1.25.1 require ( - github.com/gruntwork-io/terratest v0.50.0 + github.com/IBM/go-sdk-core v1.1.0 + github.com/gruntwork-io/terratest v0.51.0 github.com/stretchr/testify v1.11.1 - github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6 + github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11 ) require ( @@ -15,10 +16,9 @@ require ( github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect github.com/IBM-Cloud/power-go-client v1.12.0 // indirect github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect - github.com/IBM/go-sdk-core v1.1.0 // indirect github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect github.com/IBM/platform-services-go-sdk v0.86.1 // indirect - github.com/IBM/project-go-sdk v0.3.6 // indirect + github.com/IBM/project-go-sdk v0.3.9 // indirect github.com/IBM/schematics-go-sdk v0.4.0 // indirect github.com/IBM/vpc-go-sdk v1.0.2 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -92,6 +92,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/crypto v0.41.0 // indirect golang.org/x/mod v0.26.0 // indirect golang.org/x/net v0.42.0 // indirect @@ -103,5 +104,5 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/tests/go.sum b/tests/go.sum index 52d261d..5fd0c93 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -13,8 +13,8 @@ github.com/IBM/go-sdk-core/v5 v5.21.0 h1:DUnYhvC4SoC8T84rx5omnhY3+xcQg/Whyoa3mDP github.com/IBM/go-sdk-core/v5 v5.21.0/go.mod h1:Q3BYO6iDA2zweQPDGbNTtqft5tDcEpm6RTuqMlPcvbw= github.com/IBM/platform-services-go-sdk v0.86.1 h1:ngBpaXvUF3gmLvbU1Z4lX1wowOSYgGoKBEBaR/urt30= github.com/IBM/platform-services-go-sdk v0.86.1/go.mod h1:aGD045m6I8pfcB77wft8w2cHqWOJjcM3YSSV55BX0Js= -github.com/IBM/project-go-sdk v0.3.6 h1:DRiANKnAePevFsIKSvR89SUaMa2xsd7YKK71Ka1eqKI= -github.com/IBM/project-go-sdk v0.3.6/go.mod h1:FOJM9ihQV3EEAY6YigcWiTNfVCThtdY8bLC/nhQHFvo= +github.com/IBM/project-go-sdk v0.3.9 h1:D/UfMMn+vMQyvYf9EfocV6HrD3HcVpeIVoUSjNKuROo= +github.com/IBM/project-go-sdk v0.3.9/go.mod h1:FOJM9ihQV3EEAY6YigcWiTNfVCThtdY8bLC/nhQHFvo= github.com/IBM/schematics-go-sdk v0.4.0 h1:x01f/tPquYJYLQzJLGuxWfCbV/EdSMXRikOceNy/JLM= github.com/IBM/schematics-go-sdk v0.4.0/go.mod h1:Xe7R7xgwmXBHu09w2CbBe8lkWZaYxNQo19bS4dpLrUA= github.com/IBM/vpc-go-sdk v1.0.2 h1:WhI1Cb8atA8glUdFg0SEUh9u8afjnKHxZAj9onQBi04= @@ -153,8 +153,8 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gruntwork-io/terratest v0.50.0 h1:AbBJ7IRCpLZ9H4HBrjeoWESITv8nLjN6/f1riMNcAsw= -github.com/gruntwork-io/terratest v0.50.0/go.mod h1:see0lbKvAqz6rvzvN2wyfuFQQG4PWcAb2yHulF6B2q4= +github.com/gruntwork-io/terratest v0.51.0 h1:RCXlCwWlHqhUoxgF6n3hvywvbvrsTXqoqt34BrnLekw= +github.com/gruntwork-io/terratest v0.51.0/go.mod h1:evZHXb8VWDgv5O5zEEwfkwMhkx9I53QR/RB11cISrpg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -302,8 +302,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6 h1:Tr7AlrQ+s1Nc9VOwB+It8sItnDOXhfXTxKqI2KtdyFA= -github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6/go.mod h1:YBrRYc+5y5Pr9CXmY35lOqTQdlIjA4x4+3iVObXGOCE= +github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11 h1:+ATsuqFoHUg/EWpBfF7o8wzxibSan8hG5DJV2NIgrO4= +github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.11/go.mod h1:9QXyZWo0MotbNavJDyeEdpTj1YKoI6IT1wOPJnI1ahI= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw= github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk= @@ -338,6 +338,8 @@ go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHy go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -507,8 +509,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -516,6 +518,7 @@ 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= @@ -533,5 +536,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/tests/pr_test.go b/tests/pr_test.go index de52b20..779b67b 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -274,9 +274,10 @@ func TestAddonConfigurations(t *testing.T) { t.Parallel() options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{ - Testing: t, - Prefix: "virt-def", - QuietMode: false, + Testing: t, + Prefix: "virt-def", + OverrideInputMappings: core.BoolPtr(true), + QuietMode: false, }) options.AddonConfig = cloudinfo.NewAddonConfigTerraform( @@ -290,22 +291,35 @@ func TestAddonConfigurations(t *testing.T) { }, ) - /* - 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 - is not considered by projects as EN is not a direct dependency of VSI DA. So undeploy fails, because - key protect instance can't be deleted because of active keys created by EN. Hence for now, we don't want to deploy - EN. - - Issue has been created for projects team. https://github.ibm.com/epx/projects/issues/4750 - Once that is fixed, we can remove the logic to disable EN - */ + // use existing secrets manager instance to help prevent hitting trial instance limit in account options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{ { - OfferingName: "deploy-arch-ibm-event-notifications", + 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 + }, + }, + // // Disable target / route creation to help prevent hitting quota in account + { + OfferingName: "deploy-arch-ibm-cloud-monitoring", OfferingFlavor: "fully-configurable", - Enabled: core.BoolPtr(false), // explicitly disabled + Inputs: map[string]interface{}{ + "enable_metrics_routing_to_cloud_monitoring": false, + }, + }, + { + OfferingName: "deploy-arch-ibm-activity-tracker", + OfferingFlavor: "fully-configurable", + Inputs: map[string]interface{}{ + "enable_activity_tracker_event_routing_to_cloud_logs": false, + }, }, } + err := options.RunAddonTest() require.NoError(t, err) } From 406e8555208afe4c6b80d8079188e3cc6f11c2de Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Thu, 9 Oct 2025 22:23:41 +0530 Subject: [PATCH 7/8] removed duplicate field --- ibm_catalog.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index 94bc272..29ffe35 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -687,24 +687,6 @@ }, "virtual": true }, - { - "key": "secrets_manager_service_plan", - "type": "string", - "required": true, - "virtual": true, - "default_value": "standard", - "options": [ - { - "displayname": "Standard", - "value": "standard" - }, - { - "displayname": "Trial", - "value": "trial" - } - ], - "description": "The pricing plan to use when provisioning a Secrets Manager instance for centrally managing ingress certificates for OpenShift cluster. Possible values: `standard`, `trial`. You can create only one Trial instance of Secrets Manager per account. Before you can create a new Trial instance, you must delete the existing Trial instance and its reclamation. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-create-instance&interface=ui#upgrade-instance-standard)." - }, { "key": "vpc_file_default_storage_class" }, From d85cda9d160b105079cd151c06fe50190c143d82 Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Fri, 10 Oct 2025 18:56:29 +0530 Subject: [PATCH 8/8] addressed review comment --- tests/pr_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pr_test.go b/tests/pr_test.go index 779b67b..ec9c3c6 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -287,7 +287,7 @@ func TestAddonConfigurations(t *testing.T) { map[string]interface{}{ "region": "eu-de", "prefix": options.Prefix, - "secrets_manager_service_plan": "trial", + "secrets_manager_service_plan": "__NULL__", }, )