Skip to content

Commit c1a24e8

Browse files
feat: DA updates:<br>- A default value has been added for the prefix input using random string generator<br>- regex validation has also been added to the prefix input (#748)
1 parent 167c2fd commit c1a24e8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ibm_catalog.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,18 @@
5858
},
5959
{
6060
"key": "prefix",
61-
"required": true
61+
"required": true,
62+
"default_value": "dev",
63+
"random_string": {
64+
"length": 4
65+
},
66+
"value_constraints": [
67+
{
68+
"type": "regex",
69+
"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.",
70+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
71+
}
72+
]
6273
},
6374
{
6475
"key": "cbr_zones",

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ variable "ibmcloud_api_key" {
1111
variable "prefix" {
1212
type = string
1313
nullable = true
14-
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-cbr. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
14+
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)."
1515

1616
validation {
1717
# - null and empty string is allowed

0 commit comments

Comments
 (0)