Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@
},
{
"key": "service_crn",
"required": true
"required": true,
"value_constraints": [
{
"type": "regex",
"description": "The value provided for 'service_crn' is not valid.",
"value": "^crn:v\\d:(.*:){2}service:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$"
}
]
},
{
"key": "endpoint_type",
Expand Down
8 changes: 8 additions & 0 deletions solutions/vpe-object/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ variable "fully_qualified_domain_names" {
variable "service_crn" {
type = string
description = "CRN of the service to map on VPE entry and on VPE gateway."

validation {
condition = anytrue([
can(regex("^crn:v\\d:(.*:){2}service:(.*:)([aos]\\/[\\w_\\-]+):[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.service_crn)),
var.service_crn == null,
])
error_message = "The value provided for 'service_crn' is not valid."
}
}