From d3a6d20ac8f194cbdcc66555f430ed2a518b0c4e Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Tue, 4 Nov 2025 12:45:44 +0530 Subject: [PATCH 1/7] feat: Add UI regex validation --- ibm_catalog.json | 31 ++++++++++++++++++++--- solutions/fully-configurable/variables.tf | 2 +- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index 3002258..4c4354e 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -74,7 +74,18 @@ }, { "key": "prefix", - "required": true + "required": true, + "default_value": "dev", + "random_string": { + "length": 4 + }, + "value_constraints": [ + { + "type": "regex", + "description": "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--'). It should not exceed 16 characters.", + "value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$" + } + ] }, { "key": "provider_visibility", @@ -96,11 +107,25 @@ }, { "key": "existing_cluster_crn", - "required": true + "required": true, + "value_constraints": [ + { + "type": "regex", + "description": "The value provided for 'existing_cluster_crn' is not valid.", + "value": "^crn:v1:bluemix:[^:]+:containers-kubernetes:[^:]+:a/[0-9a-fA-F]{32}:[a-z0-9]+::$" + } + ] }, { "key": "existing_secrets_manager_crn", - "required": true + "required": true, + "value_constraints": [ + { + "type": "regex", + "description": "The value provided for 'existing_secrets_manager_crn' is not valid.", + "value": "^__NULL__$|^crn:(.*:){3}secrets-manager:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" + } + ] }, { "key": "secrets_manager_ibmcloud_api_key" diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index f07a951..6d66145 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -29,7 +29,7 @@ variable "provider_visibility" { variable "prefix" { type = string nullable = true - description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: prod-0205. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)." + description = "The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To skip using a prefix, set this value to null or an empty string. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)." validation { # - null and empty string is allowed From 9559987904b3d870eb93e7fca3953ae34574c23c Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Thu, 13 Nov 2025 13:50:38 +0530 Subject: [PATCH 2/7] fix: crn pattern --- ibm_catalog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index 71510e9..bcfe1f1 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -112,7 +112,7 @@ { "type": "regex", "description": "The value provided for 'existing_cluster_crn' is not valid.", - "value": "^crn:v1:bluemix:[^:]+:containers-kubernetes:[^:]+:a/[0-9a-fA-F]{32}:[a-z0-9]+::$" + "value": "^crn:v\\d:(.*:){2}{3}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" } ] }, @@ -123,7 +123,7 @@ { "type": "regex", "description": "The value provided for 'existing_secrets_manager_crn' is not valid.", - "value": "^__NULL__$|^crn:(.*:){3}secrets-manager:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" + "value": "^__NULL__$|^crn:v\\d:(.*:){2}{3}secrets-manager:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" } ] }, From 2df666c3af9ce4788ae3b332def3f4288c3e5f42 Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Thu, 13 Nov 2025 14:44:32 +0530 Subject: [PATCH 3/7] fix --- ibm_catalog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index bcfe1f1..d2fc3ea 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -112,7 +112,7 @@ { "type": "regex", "description": "The value provided for 'existing_cluster_crn' is not valid.", - "value": "^crn:v\\d:(.*:){2}{3}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" + "value": "^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" } ] }, @@ -123,7 +123,7 @@ { "type": "regex", "description": "The value provided for 'existing_secrets_manager_crn' is not valid.", - "value": "^__NULL__$|^crn:v\\d:(.*:){2}{3}secrets-manager:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" + "value": "^__NULL__$|^crn:v\\d:(.*:){2}secrets-manager:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" } ] }, From 051b77de7ca590403d4eecfdfaa7bbe2945d831b Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Mon, 17 Nov 2025 14:13:38 +0530 Subject: [PATCH 4/7] fix --- ibm_catalog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index d2fc3ea..5bfde1a 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -112,7 +112,7 @@ { "type": "regex", "description": "The value provided for 'existing_cluster_crn' is not valid.", - "value": "^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$" + "value": "^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{20}::$" } ] }, From 87c0b98de8b4ed0a9c392df6093c43e2923bae7e Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Wed, 19 Nov 2025 23:47:28 +0530 Subject: [PATCH 5/7] fix --- solutions/fully-configurable/variables.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index f46373c..1be9b9a 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -57,12 +57,28 @@ variable "existing_cluster_crn" { type = string description = "The CRN of the to deploy ESO operator onto. This value cannot be null." nullable = false + + validation { + condition = anytrue([ + can(regex("^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{20}::$", var.existing_cluster_crn)), + var.existing_cluster_crn == null, + ]) + error_message = "The value provided for 'existing_cluster_crn' is not valid." + } } variable "existing_secrets_manager_crn" { type = string description = "The CRN of the existing Secrets Manager instance to use. This value cannot be null." nullable = false + + validation { + condition = anytrue([ + can(regex("^crn:v\\d:(.*:){2}secrets-manager:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.existing_secrets_manager_crn)), + var.existing_secrets_manager_crn == null, + ]) + error_message = "The value provided for 'existing_secrets_manager_crn' is not valid." + } } ############################################################################################################ From a26e29b8879b9abea8854b366c233c8de0d45f6f Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Sat, 22 Nov 2025 16:44:58 +0530 Subject: [PATCH 6/7] fix --- ibm_catalog.json | 2 +- solutions/fully-configurable/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index 5bfde1a..2aed394 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -112,7 +112,7 @@ { "type": "regex", "description": "The value provided for 'existing_cluster_crn' is not valid.", - "value": "^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{20}::$" + "value": "^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[a-z0-9]{20}::$" } ] }, diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 1be9b9a..4604367 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -60,7 +60,7 @@ variable "existing_cluster_crn" { validation { condition = anytrue([ - can(regex("^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{20}::$", var.existing_cluster_crn)), + can(regex("^crn:v\\d:(.*:){2}containers-kubernetes:(.*:)([aos]\\/[\\w_\\-]+):[a-z0-9]{20}::$", var.existing_cluster_crn)), var.existing_cluster_crn == null, ]) error_message = "The value provided for 'existing_cluster_crn' is not valid." From 3cb3bc26a5890863a0f6a58dafd5eb64710e976e Mon Sep 17 00:00:00 2001 From: Aditya-ranjan-16 Date: Mon, 24 Nov 2025 13:29:09 +0530 Subject: [PATCH 7/7] bump cda --- common-dev-assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-dev-assets b/common-dev-assets index 37f2eb4..cefc143 160000 --- a/common-dev-assets +++ b/common-dev-assets @@ -1 +1 @@ -Subproject commit 37f2eb4d1f5286752b21be52d89e77ae1614570c +Subproject commit cefc143fe9db966925c422ed7c67d7554288e8ff