Skip to content

Commit 3afa31f

Browse files
feat: Add UI regex validation (#504)
1 parent 1bf0fe6 commit 3afa31f

File tree

1 file changed

+56
-7
lines changed

1 file changed

+56
-7
lines changed

ibm_catalog.json

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,14 @@
197197
"key": "cloud_logs_existing_en_instances"
198198
},
199199
{
200-
"key": "existing_en_instance_crn"
200+
"key": "existing_en_instance_crn",
201+
"value_constraints": [
202+
{
203+
"type": "regex",
204+
"description": "The value provided for 'existing_en_instance_crn' is not valid.",
205+
"value": "^__NULL__$|^crn:(.*:){3}event-notifications:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
206+
}
207+
]
201208
},
202209
{
203210
"key": "en_integration_name"
@@ -218,7 +225,14 @@
218225
"key": "cloud_monitoring_provision"
219226
},
220227
{
221-
"key": "existing_cloud_monitoring_crn"
228+
"key": "existing_cloud_monitoring_crn",
229+
"value_constraints": [
230+
{
231+
"type": "regex",
232+
"description": "The value provided for 'existing_cloud_monitoring_crn' is not valid.",
233+
"value": "^__NULL__$|^crn:(.*:){3}sysdig-monitor:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
234+
}
235+
]
222236
},
223237
{
224238
"key": "cloud_monitoring_instance_name"
@@ -405,7 +419,14 @@
405419
]
406420
},
407421
{
408-
"key": "existing_cos_instance_crn"
422+
"key": "existing_cos_instance_crn",
423+
"value_constraints": [
424+
{
425+
"type": "regex",
426+
"description": "The value provided for 'existing_cos_instance_crn' is not valid.",
427+
"value": "^__NULL__$|^crn:(.*:){3}cloud-object-storage:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
428+
}
429+
]
409430
},
410431
{
411432
"key": "existing_at_cos_target_bucket_name"
@@ -414,13 +435,27 @@
414435
"key": "existing_at_cos_target_bucket_endpoint"
415436
},
416437
{
417-
"key": "existing_cloud_logs_data_bucket_crn"
438+
"key": "existing_cloud_logs_data_bucket_crn",
439+
"value_constraints": [
440+
{
441+
"type": "regex",
442+
"description": "The value provided for 'existing_cloud_logs_data_bucket_crn' is not valid.",
443+
"value": "^__NULL__$|^crn:(.*:){3}cloud-object-storage:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}:bucket:[a-z0-9\\-]+$"
444+
}
445+
]
418446
},
419447
{
420448
"key": "existing_cloud_logs_data_bucket_endpoint"
421449
},
422450
{
423-
"key": "existing_cloud_logs_metrics_bucket_crn"
451+
"key": "existing_cloud_logs_metrics_bucket_crn",
452+
"value_constraints": [
453+
{
454+
"type": "regex",
455+
"description": "The value provided for 'existing_cloud_logs_metrics_bucket_crn' is not valid.",
456+
"value": "^__NULL__$|^crn:(.*:){3}cloud-object-storage:(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}:bucket:[a-z0-9\\-]+$"
457+
}
458+
]
424459
},
425460
{
426461
"key": "existing_cloud_logs_metrics_bucket_endpoint"
@@ -435,12 +470,26 @@
435470
"key": "skip_at_cos_auth_policy"
436471
},
437472
{
438-
"key": "existing_cos_kms_key_crn"
473+
"key": "existing_cos_kms_key_crn",
474+
"value_constraints": [
475+
{
476+
"type": "regex",
477+
"description": "The value provided for 'existing_cos_kms_key_crn' is not valid.",
478+
"value": "^__NULL__$|^crn:(.*:){3}(kms|hs-crypto):(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}:key:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
479+
}
480+
]
439481
},
440482
{
441483
"key": "existing_kms_instance_crn",
442484
"required": true,
443-
"default_value": "__NOT_SET__"
485+
"default_value": "__NOT_SET__",
486+
"value_constraints": [
487+
{
488+
"type": "regex",
489+
"description": "The value provided for 'existing_kms_instance_crn' is not valid.",
490+
"value": "^__NULL__$|^crn:(.*:){3}(kms|hs-crypto):(.*:){2}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
491+
}
492+
]
444493
},
445494
{
446495
"key": "cos_key_name"

0 commit comments

Comments
 (0)