Skip to content

Commit cd537d4

Browse files
fix: fixed incorrect validation logic for Monitoring CRN input (#290) (#291)
1 parent 40ecd9e commit cd537d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ variable "existing_monitoring_crn" {
2222

2323
validation {
2424
condition = anytrue([
25-
can(regex("^crn:(.*:){3}sysdig-secure:${var.region}(.*:){1}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.existing_monitoring_crn)),
25+
can(regex("^crn:(.*:){3}sysdig-monitor:${var.region}(.*:){1}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.existing_monitoring_crn)),
2626
var.existing_monitoring_crn == null,
2727
])
2828
error_message = "The provided Monitoring instance CRN in the input 'existing_monitoring_crn' in not valid. Please also ensure it is in the same region specified the 'region' input."

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ variable "cloud_monitoring_instance_crn" {
7474

7575
validation {
7676
condition = anytrue([
77-
can(regex("^crn:(.*:){3}sysdig-secure:${var.region}(.*:){1}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.cloud_monitoring_instance_crn)),
77+
can(regex("^crn:(.*:){3}sysdig-monitor:${var.region}(.*:){1}[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}::$", var.cloud_monitoring_instance_crn)),
7878
var.cloud_monitoring_instance_crn == null,
7979
])
8080
error_message = "The provided Monitoring instance CRN in the input 'cloud_monitoring_instance_crn' in not valid. Please also ensure it is in the same region specified the 'region' input."

0 commit comments

Comments
 (0)