Skip to content

Commit 4735d00

Browse files
committed
fix
1 parent 86d9a92 commit 4735d00

File tree

3 files changed

+43
-127
lines changed

3 files changed

+43
-127
lines changed

released/discovery_center/mission_4172/step1/main.tf

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -175,46 +175,46 @@ data "btp_subaccount_service_plan" "hana_cloud" {
175175
depends_on = [btp_subaccount_entitlement.hana_cloud]
176176
}
177177

178-
resource "btp_subaccount_service_instance" "hana_cloud" {
179-
subaccount_id = data.btp_subaccount.dc_mission.id
180-
serviceplan_id = data.btp_subaccount_service_plan.hana_cloud.id
181-
name = "my-hana-cloud-instance"
182-
depends_on = [btp_subaccount_entitlement.hana_cloud]
183-
parameters = jsonencode(
184-
{
185-
"data" : {
186-
"memory" : 32,
187-
"edition" : "cloud",
188-
"systempassword" : "${var.hana_system_password}",
189-
"additionalWorkers" : 0,
190-
"disasterRecoveryMode" : "no_disaster_recovery",
191-
"enabledservices" : {
192-
"docstore" : false,
193-
"dpserver" : true,
194-
"scriptserver" : false
195-
},
196-
"requestedOperation" : {},
197-
"serviceStopped" : false,
198-
"slaLevel" : "standard",
199-
"storage" : 120,
200-
"vcpu" : 2,
201-
"whitelistIPs" : ["0.0.0.0/0"]
202-
}
203-
})
204-
205-
timeouts = {
206-
create = "45m"
207-
update = "45m"
208-
delete = "45m"
209-
}
210-
}
211-
212-
# Create service binding to SAP HANA Cloud service
213-
resource "btp_subaccount_service_binding" "hana_cloud" {
214-
subaccount_id = data.btp_subaccount.dc_mission.id
215-
service_instance_id = btp_subaccount_service_instance.hana_cloud.id
216-
name = "hana-cloud-key"
217-
}
178+
# resource "btp_subaccount_service_instance" "hana_cloud" {
179+
# subaccount_id = data.btp_subaccount.dc_mission.id
180+
# serviceplan_id = data.btp_subaccount_service_plan.hana_cloud.id
181+
# name = "my-hana-cloud-instance"
182+
# depends_on = [btp_subaccount_entitlement.hana_cloud]
183+
# parameters = jsonencode(
184+
# {
185+
# "data" : {
186+
# "memory" : 32,
187+
# "edition" : "cloud",
188+
# "systempassword" : "${var.hana_system_password}",
189+
# "additionalWorkers" : 0,
190+
# "disasterRecoveryMode" : "no_disaster_recovery",
191+
# "enabledservices" : {
192+
# "docstore" : false,
193+
# "dpserver" : true,
194+
# "scriptserver" : false
195+
# },
196+
# "requestedOperation" : {},
197+
# "serviceStopped" : false,
198+
# "slaLevel" : "standard",
199+
# "storage" : 120,
200+
# "vcpu" : 2,
201+
# "whitelistIPs" : ["0.0.0.0/0"]
202+
# }
203+
# })
204+
205+
# timeouts = {
206+
# create = "45m"
207+
# update = "45m"
208+
# delete = "45m"
209+
# }
210+
# }
211+
212+
# # Create service binding to SAP HANA Cloud service
213+
# resource "btp_subaccount_service_binding" "hana_cloud" {
214+
# subaccount_id = data.btp_subaccount.dc_mission.id
215+
# service_instance_id = btp_subaccount_service_instance.hana_cloud.id
216+
# name = "hana-cloud-key"
217+
# }
218218

219219
# # ------------------------------------------------------------------------------------------------------
220220
# # Create app subscription to SAP Build Process Automation
@@ -284,7 +284,7 @@ resource "btp_subaccount_subscription" "event_mesh_application" {
284284
}
285285

286286
resource "btp_subaccount_role_collection_assignment" "event_mesh_admin" {
287-
depends_on = [btp_subaccount_entitlement.event_mesh_application]
287+
depends_on = [btp_subaccount_subscription.event_mesh_application]
288288
for_each = toset(var.event_mesh_admins)
289289
subaccount_id = data.btp_subaccount.dc_mission.id
290290
role_collection_name = "Enterprise Messaging Administrator"
@@ -293,7 +293,7 @@ resource "btp_subaccount_role_collection_assignment" "event_mesh_admin" {
293293
}
294294

295295
resource "btp_subaccount_role_collection_assignment" "event_mesh_developer" {
296-
depends_on = [btp_subaccount_entitlement.event_mesh_application]
296+
depends_on = [btp_subaccount_subscription.event_mesh_application]
297297
for_each = toset(var.event_mesh_developers)
298298
subaccount_id = data.btp_subaccount.dc_mission.id
299299
role_collection_name = "Enterprise Messaging Developer"
@@ -321,6 +321,7 @@ resource "local_file" "output_vars_step1" {
321321
322322
cf_space_name = "${var.cf_space_name}"
323323
324+
cf_org_users = ${jsonencode(var.cf_org_users)}
324325
cf_org_admins = ${jsonencode(var.cf_org_admins)}
325326
cf_space_developers = ${jsonencode(var.cf_space_developers)}
326327
cf_space_managers = ${jsonencode(var.cf_space_managers)}

released/discovery_center/mission_4172/step1/variables.tf

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,11 @@ variable "origin_key" {
8080
variable "subaccount_admins" {
8181
type = list(string)
8282
description = "Defines the colleagues who are added to each subaccount as subaccount administrators."
83-
84-
# add validation to check if admins contains a list of valid email addresses
85-
validation {
86-
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)
87-
error_message = "Please enter a valid email address for the Subaccount Admins."
88-
}
8983
}
9084

9185
variable "subaccount_service_admins" {
9286
type = list(string)
9387
description = "Defines the colleagues who are added to each subaccount as subaccount service administrators."
94-
95-
# add validation to check if admins contains a list of valid email addresses
96-
validation {
97-
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)
98-
error_message = "Please enter a valid email address for the Subaccount service Admins."
99-
}
10088
}
10189

10290
variable "service_plan__sap_business_app_studio" {
@@ -112,35 +100,16 @@ variable "service_plan__sap_business_app_studio" {
112100
variable "appstudio_developers" {
113101
type = list(string)
114102
description = "Business Application Studio Developers"
115-
116-
# add validation to check if Business Application Studio Developers contains a list of valid email addresses
117-
validation {
118-
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)
119-
error_message = "Please enter a valid email address for the Business Application Studio Developers"
120-
}
121103
}
122104

123105
variable "appstudio_admins" {
124106
type = list(string)
125107
description = "Business Application Studio Administrators"
126-
127-
# add validation to check if Business Application Studio Administrators contains a list of valid email addresses
128-
validation {
129-
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)
130-
error_message = "Please enter a valid email address for the Business Application Studio Administrators."
131-
}
132108
}
133109

134110
variable "hana_cloud_admins" {
135111
type = list(string)
136112
description = "Defines the colleagues who are added as admins to access the instance of SAP HANA Cloud."
137-
138-
139-
# add validation to check if admins contains a list of valid email addresses
140-
validation {
141-
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)
142-
error_message = "Please enter a valid email address for the admins of SAP HANA Cloud instance."
143-
}
144113
}
145114

146115

@@ -195,56 +164,26 @@ variable "service_plan__sap_process_automation" {
195164
variable "process_automation_admins" {
196165
type = list(string)
197166
description = "SAP Build Process Automation Administrators"
198-
199-
# add validation to check if SAP Build Process Automation Administrators contains a list of valid email addresses
200-
validation {
201-
condition = length([for email in var.process_automation_admins : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.process_automation_admins)
202-
error_message = "Please enter a valid email address for the SAP Build Process Automation Administrators."
203-
}
204167
}
205168

206169
variable "process_automation_developers" {
207170
type = list(string)
208171
description = "SAP Build Process Automation Developers"
209-
210-
# add validation to check if SAP Build Process Automation Developers contains a list of valid email addresses
211-
validation {
212-
condition = length([for email in var.process_automation_developers : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.process_automation_developers)
213-
error_message = "Please enter a valid email address for the SAP Build Process Automation Developers."
214-
}
215172
}
216173

217174
variable "process_automation_participants" {
218175
type = list(string)
219176
description = "SAP Build Process Automation Participants"
220-
221-
# add validation to check if SAP Build Process Automation Participants contains a list of valid email addresses
222-
validation {
223-
condition = length([for email in var.process_automation_participants : can(regex("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", email))]) == length(var.process_automation_participants)
224-
error_message = "Please enter a valid email address for the SAP Build Process Automation Participants."
225-
}
226177
}
227178

228179
variable "event_mesh_admins" {
229180
type = list(string)
230181
description = "Enterprise Messaging Administrators"
231-
232-
# add validation to check if admins contains a list of valid email addresses
233-
validation {
234-
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)
235-
error_message = "Please enter a valid email address for the Enterprise Messaging Administrators."
236-
}
237182
}
238183

239184
variable "event_mesh_developers" {
240185
type = list(string)
241186
description = "Enterprise Messaging Developers"
242-
243-
# add validation to check if Enterprise Messaging Developers contains a list of valid email addresses
244-
validation {
245-
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)
246-
error_message = "Please enter a valid email address for the Enterprise Messaging Developers."
247-
}
248187
}
249188

250189
# ------------------------------------------------------------------------------------------------------

released/discovery_center/mission_4172/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

0 commit comments

Comments
 (0)