-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild_process_automation.tf
More file actions
72 lines (65 loc) · 3.03 KB
/
build_process_automation.tf
File metadata and controls
72 lines (65 loc) · 3.03 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
resource "btp_subaccount_entitlement" "process_automation_service" {
subaccount_id = btp_subaccount.trial.id
service_name = "process-automation-service"
plan_name = "standard"
}
data "btp_subaccount_service_plan" "process_automation_service" {
subaccount_id = btp_subaccount.trial.id
name = "standard"
offering_name = "process-automation-service"
}
resource "btp_subaccount_entitlement" "process_automation" {
subaccount_id = btp_subaccount.trial.id
service_name = "process-automation"
plan_name = "free"
}
resource "btp_subaccount_subscription" "process_automation" {
subaccount_id = btp_subaccount.trial.id
app_name = "process-automation"
plan_name = "free"
depends_on = [btp_subaccount_trust_configuration.customized]
timeouts = {
create = "30m"
}
# btp_subaccount_entitlement.integration_suite,
}
resource "btp_subaccount_role_collection_assignment" "process_automation_admin" {
for_each = toset("${var.admins}")
subaccount_id = btp_subaccount.trial.id
role_collection_name = "ProcessAutomationAdmin"
user_name = each.value
depends_on = [btp_subaccount_subscription.process_automation]
}
resource "btp_subaccount_role_collection_assignment" "process_automation_developer" {
for_each = toset("${var.admins}")
subaccount_id = btp_subaccount.trial.id
role_collection_name = "ProcessAutomationDeveloper"
user_name = each.value
depends_on = [btp_subaccount_subscription.process_automation]
}
resource "btp_subaccount_role_collection_assignment" "process_automation_participant" {
for_each = toset("${var.admins}")
subaccount_id = btp_subaccount.trial.id
role_collection_name = "ProcessAutomationParticipant"
user_name = each.value
depends_on = [btp_subaccount_subscription.process_automation]
}
resource "btp_subaccount_service_instance" "process_automation_service_instance" {
subaccount_id = btp_subaccount.trial.id
# The service plan ID can be looked up via the data source btp_subaccount_service_plan
serviceplan_id = data.btp_subaccount_service_plan.process_automation_service.id
name = "process-automation"
depends_on = [btp_subaccount_entitlement.process_automation_service]
}
resource "btp_subaccount_service_binding" "sap_process_automation_service" {
subaccount_id = btp_subaccount.trial.id
service_instance_id = btp_subaccount_service_instance.process_automation_service_instance.id
name = "sap_process_automation_service"
depends_on = [btp_subaccount_service_instance.process_automation_service_instance]
}
resource "btp_subaccount_service_binding" "sap_process_automation_service_user_access" {
subaccount_id = btp_subaccount.trial.id
service_instance_id = btp_subaccount_service_instance.process_automation_service_instance.id
name = "sap_process_automation_service_user_access"
depends_on = [btp_subaccount_service_instance.process_automation_service_instance]
}