forked from btp-automation-scenarios/btp-subaccount-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
185 lines (161 loc) · 4.37 KB
/
Copy pathvariables.tf
File metadata and controls
185 lines (161 loc) · 4.37 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
###
# Possible values for entering the business unit
###
variable "unit" {
type = string
description = "Defines to which organisation the sub account shall belong to."
default = "Research"
validation {
condition = contains(concat(["Research", "Test", "Sales", "Purchase", "Production", "Integration Test"]), var.unit)
error_message = "Please select a valid org name for the project account."
}
}
###
# Possible values for entering the short name business unit
###
variable "unit_shortname" {
type = string
description = "Short name for the organisation the sub account shall belong to."
default = "Test"
validation {
condition = can(regex("^[a-zA-Z0-9_]", var.unit_shortname))
error_message = "Please enter a valid short name for the 'unit' the subaccount is assigned to."
}
}
###
# Email address of the architect
###
variable "architect" {
type = string
description = "Defines the email address of the architect for the subaccount"
validation {
condition = can(regex("(@yourorg.com|@test.com)$", var.architect))
error_message = "Please enter a valid email address for the architect of the subaccount."
}
}
###
# Custom parent_directory_id for the sub account
###
variable "parent_directory_id" {
type = string
description = "Defines the id of the parent directory."
}
###
# Usage of the subaccount
###
variable "usage" {
type = string
description = "Defines the usage pattern of the subaccount."
}
###
# Email address of the costreference
###
variable "costcenter" {
type = string
description = "Defines the costcenter for the subaccount"
validation {
condition = can(regex("^[0-9]{10}$", var.costcenter))
error_message = "Please enter a valid costcenter for the business unit."
}
}
###
# Owner of the subaccount
###
variable "owner" {
type = string
description = "Defines the owner of the subaccount"
default = "jane.doe@test.com"
validation {
condition = can(regex("(@yourorg.com|@test.com)$", var.owner))
error_message = "Please enter a valid email address for the owner of the sub account."
}
}
###
# Team of the sub account
###
variable "team" {
type = string
description = "Defines the team of the sub account"
default = "sap.team@test.com"
validation {
condition = can(regex("(@yourorg.com|@test.com)$", var.team))
error_message = "Please enter a valid email address for the team of the sub account."
}
}
###
# Stage of the subaccount
###
variable "stage" {
type = string
description = "The stage/tier the sub account will be used for."
default = "DEV"
validation {
condition = contains(["DEV", "TST", "PRD", "EDU"], var.stage)
error_message = "Select a valid stage for the sub account."
}
}
###
# Region of BTP sub account
###
variable "region" {
type = string
description = "The region where the sub account shall be created in."
default = "us10"
}
variable "emergency_admins" {
type = list(string)
description = "Defines the colleagues who are added to each subaccount as emergency administrators."
}
###
# Entitlements
###
variable "entitlements" {
description = "List of entitlements for a BTP subaccount"
type = list(object({
group = string
type = string
name = string
plan = string
amount = number
}))
default = [
{
group = "Audit + Application Log"
type = "service"
name = "auditlog-viewer"
plan = "free"
amount = null
},
{
group = "Alert"
type = "service"
name = "alert-notification"
plan = "standard"
amount = null
},
{
group = "SAP HANA Cloud"
type = "service"
name = "hana-cloud"
plan = "hana"
amount = null
},
{
group = "SAP HANA Cloud"
type = "service"
name = "hana"
plan = "hdi-shared"
amount = null
}
]
}
variable "cf_environment_label" {
type = string
description = "In case there are multiple environments available for a subaccount, you can use this label to choose with which one you want to go. If nothing is given, we take by default the first available."
default = ""
}
variable "identity_provider" {
type = string
description = "The identity provider for the subaccount."
default = "sap.ids"
}