Skip to content

Commit 668ea21

Browse files
author
Arya Girish K
committed
feat: Add UI regex validation
1 parent 17b6f40 commit 668ea21

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

ibm_catalog.json

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,14 @@
151151
},
152152
{
153153
"key": "existing_secrets_manager_crn",
154-
"required": true
154+
"required": true,
155+
"value_constraints": [
156+
{
157+
"type": "regex",
158+
"description": "The value provided for 'existing_secrets_manager_crn' is not valid.",
159+
"value": "^__NULL__$|^crn:(.*:){3}secrets-manager:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
160+
}
161+
]
155162
},
156163
{
157164
"key": "prefix",
@@ -262,7 +269,14 @@
262269
"key": "ibmcloud_cis_api_key"
263270
},
264271
{
265-
"key": "internet_services_crn"
272+
"key": "internet_services_crn",
273+
"value_constraints": [
274+
{
275+
"type": "regex",
276+
"description": "The value provided for 'internet_services_crn' is not valid.",
277+
"value": "^__NULL__$|^crn:(.*:){3}internet-svcs:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
278+
}
279+
]
266280
},
267281
{
268282
"key": "internet_services_account_id"
@@ -294,7 +308,14 @@
294308
"required": true
295309
},
296310
{
297-
"key": "acme_letsencrypt_private_key_secrets_manager_secret_crn"
311+
"key": "acme_letsencrypt_private_key_secrets_manager_secret_crn",
312+
"value_constraints": [
313+
{
314+
"type": "regex",
315+
"description": "The value provided for 'acme_letsencrypt_private_key_secrets_manager_secret_crn' is not valid.",
316+
"value": "^__NULL__$|^crn:(.*:){3}secrets-manager:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}:secret:[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
317+
}
318+
]
298319
},
299320
{
300321
"key": "skip_iam_authorization_policy"

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variable "existing_secrets_manager_crn" {
2323
variable "prefix" {
2424
type = string
2525
nullable = true
26-
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-us-south. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
26+
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)."
2727

2828
validation {
2929
# - null and empty string is allowed

0 commit comments

Comments
 (0)