-
Notifications
You must be signed in to change notification settings - Fork 19
/
compartments-variables.tf
55 lines (50 loc) · 2.42 KB
/
compartments-variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -----------------------------------------------------------------------------
# Compartment specific variables - Required
# -----------------------------------------------------------------------------
variable "parent_compartment_name" {
type = string
description = "Name of the top level / parent compartment"
validation {
condition = can(regex("^([\\w\\.-]){1,100}$", var.parent_compartment_name))
error_message = "Allowed maximum 100 characters, including letters, numbers, periods, hyphens, underscores, and is unique within its parent compartment."
}
}
# -----------------------------------------------------------------------------
# Compartment specific variables - Optional
# -----------------------------------------------------------------------------
variable "network_compartment_name" {
type = string
description = "Name of the top level network compartment"
default = "Network"
validation {
condition = can(regex("^([\\w\\.-]){1,100}$", var.network_compartment_name))
error_message = "Allowed maximum 100 characters, including letters, numbers, periods, hyphens, underscores, and is unique within its parent compartment."
}
}
variable "security_compartment_name" {
type = string
description = "Name of the top level security compartment"
default = "Security"
validation {
condition = can(regex("^([\\w\\.-]){1,100}$", var.security_compartment_name))
error_message = "Allowed maximum 100 characters, including letters, numbers, periods, hyphens, underscores, and is unique within its parent compartment."
}
}
variable "common_infra_compartment_name" {
type = string
description = "Name of the common infrastructure compartment"
default = "Common-Infra"
validation {
condition = can(regex("^([\\w\\.-]){1,100}$", var.common_infra_compartment_name))
error_message = "Allowed maximum 100 characters, including letters, numbers, periods, hyphens, underscores, and is unique within its parent compartment."
}
}
variable "applications_compartment_name" {
type = string
description = "Name of the top level application compartment"
default = "Applications"
validation {
condition = can(regex("^([\\w\\.-]){1,100}$", var.applications_compartment_name))
error_message = "Allowed maximum 100 characters, including letters, numbers, periods, hyphens, underscores, and is unique within its parent compartment."
}
}