Skip to content

Commit 2de8265

Browse files
feat: Add Project UI regex validation for the DA (#1071)
1 parent 10cb19c commit 2de8265

File tree

1 file changed

+64
-8
lines changed

1 file changed

+64
-8
lines changed

ibm_catalog.json

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@
101101
"key": "ibmcloud_api_key"
102102
},
103103
{
104-
"key": "prefix"
104+
"key": "prefix",
105+
"value_constraints": [
106+
{
107+
"type": "regex",
108+
"description": "Prefix must begin with a lowercase letter, may contain only lowercase letters, digits, and hyphens '-', must end with a lowercase letter or digit, and must not exceed 16 characters.",
109+
"value": "^[a-z]([-a-z0-9]{0,14}[a-z0-9])?$"
110+
}
111+
]
105112
},
106113
{
107114
"key": "resource_tags",
@@ -114,7 +121,14 @@
114121
}
115122
},
116123
{
117-
"key": "ssh_key"
124+
"key": "ssh_key",
125+
"value_constraints": [
126+
{
127+
"type": "regex",
128+
"description": "The value provided for 'ssh_key' is not valid.",
129+
"value": "^ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3} ?([^@]+@[^@]+)?"
130+
}
131+
]
118132
}
119133
],
120134
"iam_permissions": [
@@ -218,13 +232,27 @@
218232
},
219233
{
220234
"key": "ssh_public_key",
221-
"required": true
235+
"required": true,
236+
"value_constraints": [
237+
{
238+
"type": "regex",
239+
"description": "The value provided for 'ssh_public_key' is not valid.",
240+
"value": "^__NULL__$|^ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3} ?([^@]+@[^@]+)?"
241+
}
242+
]
222243
},
223244
{
224245
"key": "ibmcloud_api_key"
225246
},
226247
{
227-
"key": "prefix"
248+
"key": "prefix",
249+
"value_constraints": [
250+
{
251+
"type": "regex",
252+
"description": "Prefix must begin with a lowercase letter, may contain only lowercase letters, digits, and hyphens '-', must end with a lowercase letter or digit, and must not exceed 16 characters.",
253+
"value": "^[a-z]([-a-z0-9]{0,14}[a-z0-9])?$"
254+
}
255+
]
228256
},
229257
{
230258
"key": "existing_ssh_key_name"
@@ -595,7 +623,14 @@
595623
"configuration": [
596624
{
597625
"key": "ssh_public_key",
598-
"required": true
626+
"required": true,
627+
"value_constraints": [
628+
{
629+
"type": "regex",
630+
"description": "The value provided for 'ssh_public_key' is not valid.",
631+
"value": "^__NULL__$|^ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3} ?([^@]+@[^@]+)?"
632+
}
633+
]
599634
},
600635
{
601636
"custom_config": {
@@ -817,7 +852,14 @@
817852
"key": "ibmcloud_api_key"
818853
},
819854
{
820-
"key": "prefix"
855+
"key": "prefix",
856+
"value_constraints": [
857+
{
858+
"type": "regex",
859+
"description": "Prefix must begin with a lowercase letter, may contain only lowercase letters, digits, and hyphens '-', must end with a lowercase letter or digit, and must not exceed 16 characters.",
860+
"value": "^[a-z]([-a-z0-9]{0,14}[a-z0-9])?$"
861+
}
862+
]
821863
},
822864
{
823865
"key": "tags",
@@ -1218,7 +1260,14 @@
12181260
"key": "ibmcloud_api_key"
12191261
},
12201262
{
1221-
"key": "prefix"
1263+
"key": "prefix",
1264+
"value_constraints": [
1265+
{
1266+
"type": "regex",
1267+
"description": "Prefix must begin with a lowercase letter, may contain only lowercase letters, digits, and hyphens '-', must end with a lowercase letter or digit, and must not exceed 13 characters.",
1268+
"value": "^[a-z]([-a-z0-9]{0,11}[a-z0-9])?$"
1269+
}
1270+
]
12221271
},
12231272
{
12241273
"key": "resource_tags",
@@ -1752,7 +1801,14 @@
17521801
"key": "ibmcloud_api_key"
17531802
},
17541803
{
1755-
"key": "prefix"
1804+
"key": "prefix",
1805+
"value_constraints": [
1806+
{
1807+
"type": "regex",
1808+
"description": "Prefix must begin with a lowercase letter, may contain only lowercase letters, digits, and hyphens '-', must end with a lowercase letter or digit, and must not exceed 13 characters.",
1809+
"value": "^[a-z]([-a-z0-9]{0,11}[a-z0-9])?$"
1810+
}
1811+
]
17561812
},
17571813
{
17581814
"key": "tags",

0 commit comments

Comments
 (0)