You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ibm_catalog.json
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,14 @@
70
70
},
71
71
{
72
72
"key": "prefix",
73
-
"required": true
73
+
"required": true,
74
+
"value_constraints": [
75
+
{
76
+
"type": "regex",
77
+
"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.",
Copy file name to clipboardExpand all lines: solutions/fully-configurable/variables.tf
+31-5Lines changed: 31 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,28 @@ variable "region" {
17
17
18
18
variable"prefix" {
19
19
type=string
20
-
description="Prefix to add to all resources created by this deployable architecture. To not use any prefix value, you can set this value to `null` or an empty string."
20
+
nullable=true
21
+
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)."
22
+
21
23
validation {
22
-
condition=(var.prefix==null?true:
24
+
# - null and empty string is allowed
25
+
# - Must not contain consecutive hyphens (--): length(regexall("--", var.prefix)) == 0
26
+
# - Starts with a lowercase letter: [a-z]
27
+
# - Contains only lowercase letters (a–z), digits (0–9), and hyphens (-)
error_message="Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters."
35
+
error_message="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 ('--')."
0 commit comments