Skip to content

Commit c6aef1c

Browse files
committed
QAS Polished 4033 and few other fixes
1 parent 7b13304 commit c6aef1c

File tree

13 files changed

+423
-367
lines changed

13 files changed

+423
-367
lines changed

released/discovery_center/mission_4033/locals.tf

Lines changed: 0 additions & 5 deletions
This file was deleted.

released/discovery_center/mission_4033/outputs.tf

Lines changed: 0 additions & 4 deletions
This file was deleted.

released/discovery_center/mission_4033/README.md renamed to released/discovery_center/mission_4033/step1/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Discovery Center mission - Create simple, connected digital experiences with API-based integration
1+
# Discovery Center mission - Create simple, connected digital experiences with API-based integration - Step 1
22

33
## Overview
44

@@ -25,7 +25,7 @@ To deploy the resources you must:
2525
export BTP_PASSWORD=<your_password>
2626
```
2727

28-
2. Change the variables in the `samples.tfvars` file to meet your requirements
28+
2. Change the variables in the `sample.tfvars` file to meet your requirements
2929

3030
> ⚠ NOTE: You should pay attention **specifically** to the users defined in the samples.tfvars whether they already exist in your SAP BTP accounts. Otherwise you might get error messages like e.g. `Error: The user could not be found: [email protected]`.
3131
@@ -53,5 +53,5 @@ To deploy the resources you must:
5353
You probably want to remove the assets after trying them out to avoid unnecessary costs. To do so execute the following command:
5454

5555
```bash
56-
terraform destroy
56+
terraform destroy -var-file="samples.tfvars"
5757
```

released/discovery_center/mission_4033/main.tf renamed to released/discovery_center/mission_4033/step1/main.tf

Lines changed: 133 additions & 115 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
output "subaccount_id" {
2+
value = data.btp_subaccount.dc_mission.id
3+
description = "The ID of the project subaccount."
4+
}
5+
6+
output "integration_suite_url" {
7+
value = btp_subaccount_subscription.sap_integration_suite.subscription_url
8+
}
9+
10+
output "process_automation_subscription_url" {
11+
value = btp_subaccount_subscription.build_process_automation.subscription_url
12+
description = "Subscription URL for SAP Build Process Automation"
13+
}
14+
15+
output "kyma_url" {
16+
value = btp_subaccount_environment_instance.kyma.dashboard_url
17+
description = "Subscription URL for SAP Build Process Automation"
18+
}

released/discovery_center/mission_4033/provider.tf renamed to released/discovery_center/mission_4033/step1/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
btp = {
55
source = "sap/btp"
6-
version = "~> 1.5.0"
6+
version = "~> 1.6.0"
77
}
88
}
99
}

released/discovery_center/mission_4033/sample.tfvars renamed to released/discovery_center/mission_4033/step1/sample.tfvars

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
globalaccount = "yourglobalaccount"
66
region = "us10"
77
subaccount_name = "DC Mission 4033 - Create simple, connected digital experiences with API-based integration 1"
8-
custom_idp = "xxxxxxxxxxxxx.accounts.ondemand.com"
8+
custom_idp = "<your_idp>.accounts.ondemand.com"
99

1010
kyma_instance = {
1111
name = "my-kyma-environment"
@@ -23,7 +23,6 @@ kyma_instance = {
2323
# ------------------------------------------------------------------------------------------------------
2424
subaccount_admins = ["[email protected]"]
2525
subaccount_service_admins = ["[email protected]"]
26-
conn_dest_admins = ["[email protected]"]
2726
int_provisioners = ["[email protected]"]
2827
users_buildApps_admins = ["[email protected]"]
2928
users_registry_admins = ["[email protected]"]
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
######################################################################
2+
# Customer account setup
3+
######################################################################
4+
# subaccount
5+
variable "globalaccount" {
6+
type = string
7+
description = "The globalaccount subdomain."
8+
default = "yourglobalaccount"
9+
}
10+
# subaccount
11+
variable "subaccount_name" {
12+
type = string
13+
description = "The subaccount name."
14+
default = "DC Mission 4033 - Create simple, connected digital experiences with API-based integration"
15+
}
16+
17+
variable "subaccount_id" {
18+
type = string
19+
description = "The subaccount ID."
20+
default = ""
21+
}
22+
23+
# Region
24+
variable "region" {
25+
type = string
26+
description = "The region where the project account shall be created in."
27+
default = "us10"
28+
}
29+
30+
# CLI server
31+
variable "cli_server_url" {
32+
type = string
33+
description = "The BTP CLI server URL."
34+
default = "https://cli.btp.cloud.sap"
35+
}
36+
37+
variable "subaccount_admins" {
38+
type = list(string)
39+
description = "Defines the colleagues who are added to each subaccount as Subaccount administrators."
40+
}
41+
42+
variable "subaccount_service_admins" {
43+
type = list(string)
44+
description = "Defines the colleagues who are added to each subaccount as Subaccount service administrators."
45+
}
46+
47+
variable "service_plan__sap_build_apps" {
48+
type = string
49+
description = "The plan for SAP Build Apps subscription"
50+
default = "free"
51+
validation {
52+
condition = contains(["free", "standard", "partner"], var.service_plan__sap_build_apps)
53+
error_message = "Invalid value for service_plan__sap_build_apps. Only 'free', 'standard' and 'partner' are allowed."
54+
}
55+
}
56+
57+
variable "service_plan__sap_process_automation" {
58+
type = string
59+
description = "The plan for SAP Build Process Automation"
60+
default = "standard"
61+
}
62+
63+
variable "service_plan__sap_integration_suite" {
64+
type = string
65+
description = "The plan for SAP Integration Suite"
66+
default = "enterprise_agreement"
67+
validation {
68+
condition = contains(["enterprise_agreement", "free"], var.service_plan__sap_integration_suite)
69+
error_message = "Invalid value for service_plan__sap_integration_suite. Only 'enterprise_agreement' and 'free' are allowed."
70+
}
71+
}
72+
73+
variable "service_plan__apimanagement_apiportal" {
74+
type = string
75+
description = "The plan for SAP Build Process Automation"
76+
default = "apiportal-apiaccess"
77+
}
78+
79+
variable "service_plan__apimanagement_devportal" {
80+
type = string
81+
description = "The plan for SAP Build Process Automation"
82+
default = "devportal-apiaccess"
83+
}
84+
85+
###
86+
# Entitlements
87+
###
88+
variable "entitlements" {
89+
type = list(object({
90+
service_name = string
91+
plan_name = string
92+
type = string
93+
}))
94+
description = "The list of entitlements that shall be added to the subaccount."
95+
default = [
96+
{
97+
service_name = "apimanagement-apiportal"
98+
plan_name = "apiportal-apiaccess",
99+
type = "service"
100+
},
101+
{
102+
service_name = "apimanagement-devportal"
103+
plan_name = "devportal-apiaccess",
104+
type = "service"
105+
}
106+
]
107+
}
108+
109+
variable "kyma_instance" { type = object({
110+
name = string
111+
region = string
112+
machine_type = string
113+
auto_scaler_min = number
114+
auto_scaler_max = number
115+
createtimeout = string
116+
updatetimeout = string
117+
deletetimeout = string
118+
}) }
119+
120+
variable "int_provisioners" {
121+
type = list(string)
122+
description = "Integration Provisioner"
123+
}
124+
125+
variable "custom_idp" {
126+
type = string
127+
description = "Defines the custom IDP to be used for the subaccount"
128+
default = ""
129+
}
130+
131+
variable "users_buildApps_admins" {
132+
type = list(string)
133+
description = "Defines the colleagues who have the role of 'BuildAppsAdmin' in SAP Build Apps."
134+
}
135+
136+
variable "users_buildApps_developers" {
137+
type = list(string)
138+
description = "Defines the colleagues who have the role of 'BuildAppsDeveloper' in SAP Build Apps."
139+
}
140+
141+
variable "users_registry_admins" {
142+
type = list(string)
143+
description = "Defines the colleagues who have the role of 'RegistryAdmin' in SAP Build Apps."
144+
}
145+
146+
variable "users_registry_developers" {
147+
type = list(string)
148+
description = "Defines the colleagues who have the role of RegistryDeveloper' in SAP Build Apps."
149+
}
150+
151+
variable "process_automation_admins" {
152+
type = list(string)
153+
description = "Defines the users who have the role of ProcessAutomationAdmin in SAP Build Process Automation"
154+
}
155+
156+
variable "process_automation_developers" {
157+
type = list(string)
158+
description = "Defines the users who have the role of ProcessAutomationDeveloper in SAP Build Process Automation"
159+
}
160+
161+
variable "process_automation_participants" {
162+
type = list(string)
163+
description = "Defines the users who have the role of ProcessAutomationParticipant in SAP Build Process Automation"
164+
}
165+
166+
variable "service_plan__sap_identity_services_onboarding" {
167+
type = string
168+
description = "The plan for service 'Cloud Identity Services' with technical name 'sap-identity-services-onboarding'"
169+
default = "default"
170+
validation {
171+
condition = contains(["default"], var.service_plan__sap_identity_services_onboarding)
172+
error_message = "Invalid value for service_plan__sap_identity_services_onboarding. Only 'default' is allowed."
173+
}
174+
}
175+
176+
variable "custom_idp_apps_origin_key" {
177+
type = string
178+
description = "The custom identity provider for the subaccount."
179+
default = "sap.custom"
180+
}
181+
182+
variable "create_tfvars_file_for_step2" {
183+
type = bool
184+
description = "Switch to enable the creation of the tfvars file for step 2."
185+
default = true
186+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Discovery Center mission - Create simple, connected digital experiences with API-based integration - Step 2
2+
3+
## Overview
4+
5+
This script shows how to create a SAP BTP subaccount for Discovery Center Mission: Create simple, connected digital experiences with API-based integration. Step 2 comprises all activities that depend on the step 1 completion.
6+
7+
8+
## Deploying the resources
9+
10+
To deploy the resources you must:
11+
12+
13+
1. If you did not create a `tfvars` file in step 1 (via the variable `create_tfvars_file_for_step2`) you must manually Take the output of step 1 and transfer it in a `tfvars` file e.g. `sample.tfvars` file to meet your requirements. Of course you can also further adjust the generated `tfvars` file from step 1.
14+
15+
2. If not already done in step 1, initialize your workspace:
16+
17+
```bash
18+
terraform init
19+
```
20+
21+
3. You can check what Terraform plans to apply based on your configuration. If you use the generated `tfvars` file from step 1 you do not need need to explicitly add the filename to the command:
22+
23+
```bash
24+
terraform plan -var-file="terraform.tfvars"
25+
```
26+
27+
4. According to the variants of step 3. apply your configuration to provision the resources either via:
28+
29+
```bash
30+
terraform apply -var-file="terraform.tfvars"
31+
```
32+
33+
## In the end
34+
35+
You probably want to remove the assets after trying them out to avoid unnecessary costs. To do so execute the command fitting your setup:
36+
37+
```bash
38+
terraform destroy -var-file="terraform.tfvars"
39+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ------------------------------------------------------------------------------------------------------
2+
# Import custom trust config and disable for user login
3+
# ------------------------------------------------------------------------------------------------------
4+
import {
5+
to = btp_subaccount_trust_configuration.default
6+
id = "${var.subaccount_id},sap.default"
7+
}
8+
9+
resource "btp_subaccount_trust_configuration" "default" {
10+
subaccount_id = var.subaccount_id
11+
identity_provider = ""
12+
auto_create_shadow_users = false
13+
available_for_user_logon = false
14+
}

0 commit comments

Comments
 (0)