@@ -14,35 +14,35 @@ variable "compartment_id" {
14
14
type = string
15
15
description = " The OCID of the compartment for the matching rule of dynamic group"
16
16
validation {
17
- condition = length (regexall (" ^ocid1.compartment.*$" , var. compartment_id )) > 0
18
- error_message = " WLSC-ERROR: The value for compartment_id should start with \" ocid1.compartment.\" ."
17
+ condition = length (regexall (" ^ocid1.compartment.*$" , var. compartment_id )) > 0 || length ( regexall ( " ^ocid1.tenancy.*$ " , var . compartment_id )) > 0
18
+ error_message = " WLSC-ERROR: The value for compartment_id should start with \" ocid1.compartment.\" or \" ocid1.tenancy. \" ."
19
19
}
20
20
}
21
21
22
22
variable "network_compartment_id" {
23
23
type = string
24
24
description = " The OCID of the compartment where the network resources like VCN are located"
25
25
validation {
26
- condition = length (regexall (" ^ocid1.compartment.*$" , var. network_compartment_id )) > 0
27
- error_message = " WLSC-ERROR: The value for network_compartment_id should start with \" ocid1.compartment.\" ."
26
+ condition = length (regexall (" ^ocid1.compartment.*$" , var. network_compartment_id )) > 0 || length ( regexall ( " ^ocid1.tenancy.*$ " , var . network_compartment_id )) > 0
27
+ error_message = " WLSC-ERROR: The value for network_compartment_id should start with \" ocid1.compartment.\" or \" ocid1.tenancy. \" ."
28
28
}
29
29
}
30
30
31
31
variable "fss_compartment_id" {
32
32
type = string
33
33
description = " The OCID of the compartment where the file system exists"
34
34
validation {
35
- condition = length (regexall (" ^ocid1.compartment.*$" , var. fss_compartment_id )) > 0
36
- error_message = " WLSC-ERROR: The value for fss_compartment_id should start with \" ocid1.compartment.\" ."
35
+ condition = length (regexall (" ^ocid1.compartment.*$" , var. fss_compartment_id )) > 0 || length ( regexall ( " ^ocid1.tenancy.*$ " , var . fss_compartment_id )) > 0
36
+ error_message = " WLSC-ERROR: The value for fss_compartment_id should start with \" ocid1.compartment.\" or \" ocid1.tenancy. \" ."
37
37
}
38
38
}
39
39
40
40
variable "mount_target_compartment_id" {
41
41
type = string
42
42
description = " The OCID of the compartment where the mount target exists"
43
43
validation {
44
- condition = length (regexall (" ^ocid1.compartment.*$" , var. mount_target_compartment_id )) > 0
45
- error_message = " WLSC-ERROR: The value for mount_target_compartment_id should start with \" ocid1.compartment.\" ."
44
+ condition = length (regexall (" ^ocid1.compartment.*$" , var. mount_target_compartment_id )) > 0 || length ( regexall ( " ^ocid1.tenancy.*$ " , var . mount_target_compartment_id )) > 0
45
+ error_message = " WLSC-ERROR: The value for mount_target_compartment_id should start with \" ocid1.compartment.\" or \" ocid1.tenancy. \" ."
46
46
}
47
47
}
48
48
0 commit comments