Skip to content

Commit 1f381ca

Browse files
committed
bpa instance added
1 parent 13f624f commit 1f381ca

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

released/discovery_center/mission_4033/step1/main.tf

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ locals {
99
}
1010

1111
locals {
12-
service_name__sap_build_apps = "sap-build-apps"
13-
service_name__sap_process_automation = "process-automation"
14-
service_name__sap_integration_suite = "integrationsuite"
12+
service_name__sap_build_apps = "sap-build-apps"
13+
service_name__sap_process_automation = "process-automation"
14+
service_name__sap_process_automation_service = "process-automation-service"
15+
service_name__sap_integration_suite = "integrationsuite"
1516
}
1617

1718
# ------------------------------------------------------------------------------------------------------
@@ -218,6 +219,40 @@ resource "btp_subaccount_role_collection_assignment" "sbpa_part" {
218219
origin = local.origin_key_app_users
219220
}
220221

222+
# # ------------------------------------------------------------------------------------------------------
223+
# # Create service instance to SAP Build Process Automation
224+
# # ------------------------------------------------------------------------------------------------------
225+
226+
resource "btp_subaccount_entitlement" "process_automation_service" {
227+
subaccount_id = data.btp_subaccount.dc_mission.id
228+
service_name = local.service_name__sap_process_automation_service
229+
plan_name = var.service_plan__sap_process_automation_service
230+
depends_on = [btp_subaccount_subscription.build_process_automation]
231+
}
232+
233+
# Get plan for SAP AI Core service
234+
data "btp_subaccount_service_plan" "process_automation_service" {
235+
subaccount_id = data.btp_subaccount.dc_mission.id
236+
offering_name = local.service_name__sap_process_automation_service
237+
name = var.service_plan__sap_process_automation_service
238+
depends_on = [btp_subaccount_entitlement.process_automation_service]
239+
}
240+
241+
# Create service instance for SAP Build Process Automation Service
242+
resource "btp_subaccount_service_instance" "process_automation_service_instance" {
243+
subaccount_id = data.btp_subaccount.dc_mission.id
244+
serviceplan_id = data.btp_subaccount_service_plan.process_automation_service.id
245+
name = "build-process-automation-service-instance"
246+
depends_on = [btp_subaccount_entitlement.process_automation_service]
247+
}
248+
249+
# Create service binding to SAP Build Process Automation Service (exposed for a specific user group)
250+
resource "btp_subaccount_service_binding" "process_automation_service_instance_binding" {
251+
subaccount_id = data.btp_subaccount.dc_mission.id
252+
service_instance_id = btp_subaccount_service_instance.process_automation_service_instance.id
253+
name = "build-process-automation-service-instance-key"
254+
}
255+
221256
# ------------------------------------------------------------------------------------------------------
222257
# Prepare and setup app: SAP Build Apps
223258
# ------------------------------------------------------------------------------------------------------

released/discovery_center/mission_4033/step1/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ variable "service_plan__sap_process_automation" {
6060
default = "standard"
6161
}
6262

63+
variable "service_plan__sap_process_automation_service" {
64+
type = string
65+
description = "The plan for SAP Build Process Automation Service"
66+
default = "standard"
67+
}
68+
69+
6370
variable "service_plan__sap_integration_suite" {
6471
type = string
6572
description = "The plan for SAP Integration Suite"

0 commit comments

Comments
 (0)