Skip to content

Commit 2f10290

Browse files
committed
fixes
1 parent e8cfc1c commit 2f10290

File tree

3 files changed

+3
-98
lines changed

3 files changed

+3
-98
lines changed

released/discovery_center/mission_3501/step1/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ resource "btp_subaccount_subscription" "event_mesh_application" {
242242
}
243243

244244
resource "btp_subaccount_role_collection_assignment" "event_mesh_admin" {
245-
depends_on = [btp_subaccount_entitlement.event_mesh_application]
245+
depends_on = [btp_subaccount_subscription.event_mesh_application]
246246
for_each = toset(var.event_mesh_admins)
247247
subaccount_id = data.btp_subaccount.dc_mission.id
248248
role_collection_name = "Enterprise Messaging Administrator"
@@ -251,7 +251,7 @@ resource "btp_subaccount_role_collection_assignment" "event_mesh_admin" {
251251
}
252252

253253
resource "btp_subaccount_role_collection_assignment" "event_mesh_developer" {
254-
depends_on = [btp_subaccount_entitlement.event_mesh_application]
254+
depends_on = [btp_subaccount_subscription.event_mesh_application]
255255
for_each = toset(var.event_mesh_developers)
256256
subaccount_id = data.btp_subaccount.dc_mission.id
257257
role_collection_name = "Enterprise Messaging Developer"
@@ -429,6 +429,7 @@ resource "local_file" "output_vars_step1" {
429429
430430
cf_space_name = "${var.cf_space_name}"
431431
432+
cf_org_users = ${jsonencode(var.cf_org_users)}
432433
cf_org_admins = ${jsonencode(var.cf_org_admins)}
433434
cf_space_developers = ${jsonencode(var.cf_space_developers)}
434435
cf_space_managers = ${jsonencode(var.cf_space_managers)}

released/discovery_center/mission_3501/step1/variables.tf

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,11 @@ variable "origin_key" {
7979
variable "subaccount_admins" {
8080
type = list(string)
8181
description = "Defines the colleagues who are added to each subaccount as subaccount administrators."
82-
83-
# add validation to check if admins contains a list of valid email addresses
84-
validation {
85-
condition = length([for email in var.subaccount_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.subaccount_admins)
86-
error_message = "Please enter a valid email address for the Subaccount Admins."
87-
}
8882
}
8983

9084
variable "subaccount_service_admins" {
9185
type = list(string)
9286
description = "Defines the colleagues who are added to each subaccount as subaccount service administrators."
93-
94-
# add validation to check if admins contains a list of valid email addresses
95-
validation {
96-
condition = length([for email in var.subaccount_service_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.subaccount_service_admins)
97-
error_message = "Please enter a valid email address for the Subaccount service Admins."
98-
}
9987
}
10088

10189
variable "cf_space_name" {
@@ -134,45 +122,21 @@ variable "cf_space_developers" {
134122
variable "service_plan__sap_business_app_studio" {
135123
type = string
136124
description = "The plan for SAP Business Application Studio"
137-
default = "standard-edition"
138-
validation {
139-
condition = contains(["standard-edition"], var.service_plan__sap_business_app_studio)
140-
error_message = "Invalid value for service_plan__sap_business_app_studio. Only 'standard-edition' is allowed."
141-
}
142125
}
143126

144127
variable "appstudio_developers" {
145128
type = list(string)
146129
description = "Business Application Studio Developers"
147-
148-
# add validation to check if Business Application Studio Developers contains a list of valid email addresses
149-
validation {
150-
condition = length([for email in var.appstudio_developers : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.appstudio_developers)
151-
error_message = "Please enter a valid email address for the Business Application Studio Developers"
152-
}
153130
}
154131

155132
variable "appstudio_admins" {
156133
type = list(string)
157134
description = "Business Application Studio Administrators"
158-
159-
# add validation to check if Business Application Studio Administrators contains a list of valid email addresses
160-
validation {
161-
condition = length([for email in var.appstudio_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.appstudio_admins)
162-
error_message = "Please enter a valid email address for the Business Application Studio Administrators."
163-
}
164135
}
165136

166137
variable "hana_cloud_admins" {
167138
type = list(string)
168139
description = "Defines the colleagues who are added as admins to access the instance of SAP HANA Cloud."
169-
170-
171-
# add validation to check if admins contains a list of valid email addresses
172-
validation {
173-
condition = length([for email in var.hana_cloud_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.hana_cloud_admins)
174-
error_message = "Please enter a valid email address for the admins of SAP HANA Cloud instance."
175-
}
176140
}
177141

178142

@@ -210,23 +174,11 @@ variable "hana_system_password" {
210174
variable "event_mesh_admins" {
211175
type = list(string)
212176
description = "Enterprise Messaging Administrators"
213-
214-
# add validation to check if admins contains a list of valid email addresses
215-
validation {
216-
condition = length([for email in var.event_mesh_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.event_mesh_admins)
217-
error_message = "Please enter a valid email address for the Enterprise Messaging Administrators."
218-
}
219177
}
220178

221179
variable "event_mesh_developers" {
222180
type = list(string)
223181
description = "Enterprise Messaging Developers"
224-
225-
# add validation to check if Enterprise Messaging Developers contains a list of valid email addresses
226-
validation {
227-
condition = length([for email in var.event_mesh_developers : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.event_mesh_developers)
228-
error_message = "Please enter a valid email address for the Enterprise Messaging Developers."
229-
}
230182
}
231183

232184
variable "service_plan__build_workzone" {
@@ -242,45 +194,21 @@ variable "service_plan__build_workzone" {
242194
variable "workzone_se_administrators" {
243195
type = list(string)
244196
description = "Workzone Standard Edition Administrators"
245-
246-
# add validation to check if Workzone Standard Edition Administrators contains a list of valid email addresses
247-
validation {
248-
condition = length([for email in var.workzone_se_administrators : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.workzone_se_administrators)
249-
error_message = "Please enter a valid email address for the Workzone Standard Edition Administratorss."
250-
}
251197
}
252198

253199
variable "tms_admins" {
254200
type = list(string)
255201
description = "TMS Administrators"
256-
257-
# add validation to check if TMS Administrators contains a list of valid email addresses
258-
validation {
259-
condition = length([for email in var.tms_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.tms_admins)
260-
error_message = "Please enter a valid email address for the TMS Administrators."
261-
}
262202
}
263203

264204
variable "tms_import_operators" {
265205
type = list(string)
266206
description = "TMS Import Operators"
267-
268-
# add validation to check if TMS Import Operators contains a list of valid email addresses
269-
validation {
270-
condition = length([for email in var.tms_import_operators : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.tms_import_operators)
271-
error_message = "Please enter a valid email address for the TMS Import Operators."
272-
}
273207
}
274208

275209
variable "cicd_service_admins" {
276210
type = list(string)
277211
description = "CICD Service Administrators"
278-
279-
# add validation to check if CICD Service Administrators contains a list of valid email addresses
280-
validation {
281-
condition = length([for email in var.cicd_service_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.cicd_service_admins)
282-
error_message = "Please enter a valid email address for the CICD Service Administrators."
283-
}
284212
}
285213

286214
# ------------------------------------------------------------------------------------------------------

released/discovery_center/mission_3501/step2/variables.tf

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,45 +32,21 @@ variable "subaccount_id" {
3232
variable "cf_space_developers" {
3333
type = list(string)
3434
description = "CF Space developers"
35-
36-
# add validation to check if CF Space developers contains a list of valid email addresses
37-
validation {
38-
condition = length([for email in var.cf_space_developers : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.cf_space_developers)
39-
error_message = "Please enter a valid email address for the CF Space developers."
40-
}
4135
}
4236

4337
variable "cf_space_managers" {
4438
type = list(string)
4539
description = "CF Space managers"
46-
47-
# add validation to check if CF Space managers contains a list of valid email addresses
48-
validation {
49-
condition = length([for email in var.cf_space_managers : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.cf_space_managers)
50-
error_message = "Please enter a valid email address for the Cloud Connector Administrators."
51-
}
5240
}
5341

5442
variable "cf_org_admins" {
5543
type = list(string)
5644
description = "CF Org Admins"
57-
58-
# add validation to check if CF Org Admins contains a list of valid email addresses
59-
validation {
60-
condition = length([for email in var.cf_org_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.cf_org_admins)
61-
error_message = "Please enter a valid email address for the CF Org Admins."
62-
}
6345
}
6446

6547
variable "cf_org_users" {
6648
type = list(string)
6749
description = "CF Org Users"
68-
69-
# add validation to check if CF Org Users contains a list of valid email addresses
70-
validation {
71-
condition = length([for email in var.cf_org_users : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.cf_org_users)
72-
error_message = "Please enter a valid email address for the CF Org Users."
73-
}
7450
}
7551

7652
variable "custom_idp" {

0 commit comments

Comments
 (0)