Skip to content

Commit 18284fb

Browse files
committed
update readme
1 parent bece0c7 commit 18284fb

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

released/SAP-Inside-Tracks/SITBLR_DEC_2024/exercises/EXERCISE1/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ terraform {
3434
3535
provider "btp" {
3636
globalaccount = var.globalaccount
37+
idp = var.idp
3738
}
3839
```
3940

40-
What have we done? First we defined which provider we want to use and which version of the provider we want to use. In this case we want to use the provider `sap/btp` in version `1.8.0` (including potential patch versions). Then we defined the provider configuration. In this case we only need to provide the `globalaccount` parameter where we reference a variable. We will define this variable in the next step.
41+
What have we done? First we defined which provider we want to use and which version of the provider we want to use. In this case we want to use the provider `sap/btp` in version `1.8.0` (including potential patch versions). Then we defined the provider configuration. In this case we need to provide the `globalaccount` and `idp` parameters where we reference a variable. We will define this variable in the next step.
4142

4243
> [!NOTE]
4344
> We do not need any authentication information in this file. We provided the authentication information via environment variables.
@@ -49,18 +50,26 @@ variable "globalaccount" {
4950
type = string
5051
description = "The subdomain of the SAP BTP global account."
5152
}
53+
variable "idp" {
54+
type = string
55+
description = "Orgin key of Identity Provider"
56+
default = null
57+
}
5258
```
5359

54-
We have now defined the variable `globalaccount` which is required for the provider configuration. We will provide the value for this variable via the `terraform.tfvars` file. Open
60+
We have now defined the variable `globalaccount` and `idp` which is required for the provider configuration. We will provide the value for this variable via the `terraform.tfvars` file. Open
5561
the file `terraform.tfvars` and add the following content:
5662

5763
```terraform
5864
globalaccount = "<YOUR GLOBAL ACCOUNT SUBDOMAIN>"
65+
idp = null
5966
```
6067

6168
The SAP BTP Global Account Subdomain can be found in the SAP BTP Cockpit as shown below
6269
<img width="600px" src="assets/trial-account.png" alt="SAP BTP Global Account Subdomain">
6370

71+
The `idp` (Identity Provider Orgin Key ) is set to null. If a [Custom Identity Provider](https://help.sap.com/docs/btp/sap-business-technology-platform/log-on-with-custom-identity-provider-to-sap-btp-cockpit) is used to login to SAP BTP this value is set to Orgin Key of the Custom Identity Provider`
72+
6473
> [!NOTE]
6574
> We are using here a naming convention of Terraform to define the variable values. The file `terraform.tfvars` is used to define the variable values. The file is not checked into the source code repository. This is important to keep sensitive information out of the source code repository. When you run Terraform, it will automatically load the variable values from this file.
6675

released/SAP-Inside-Tracks/SITBLR_DEC_2024/exercises/EXERCISE4/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ variable "cf_landscape_label" {
2424
description = "The region where the project account shall be created in."
2525
default = "cf-us10-001"
2626
}
27+
variable "cf_plan" {
28+
type = string
29+
description = "Plan name for Cloud Foundry Runtime."
30+
default = "standard"
31+
}
2732
```
2833

2934
Then add the following code to the `main.tf`
@@ -35,7 +40,7 @@ resource "btp_subaccount_environment_instance" "cloudfoundry" {
3540
landscape_label = var.cf_landscape_label
3641
environment_type = "cloudfoundry"
3742
service_name = "cloudfoundry"
38-
plan_name = "trial"
43+
plan_name = var.cf_plan
3944
parameters = jsonencode({
4045
instance_name = local.project_subaccount_cf_org
4146
})
@@ -46,8 +51,15 @@ resource "btp_subaccount_environment_instance" "cloudfoundry" {
4651
}
4752
}
4853
```
54+
### Step 2: Add the variables to tfvar file
55+
56+
Add following variables to your `tfvars` file to configure the CloudFoundry Plan.
4957

50-
### Step 2: Adjust the output variables
58+
```terraform
59+
cf_plan = "trial"
60+
```
61+
Save the changes.
62+
### Step 3: Adjust the output variables
5163

5264
As we are using the output variables, we need to adjust the output variables in the `outputs.tf` file. Open the `outputs.tf` file and add the following code:
5365

@@ -57,7 +69,7 @@ output "cloudfoundry_org_name" {
5769
description = "The name of the cloudfoundry org connected to the project account."
5870
}
5971
```
60-
### Step 3: Apply the changes
72+
### Step 4: Apply the changes
6173

6274
1. Plan the Terraform configuration to see what will be created:
6375

released/SAP-Inside-Tracks/SITBLR_DEC_2024/exercises/EXERCISE5/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ To configure the Cloud Foundry provider add the following lines at the end of th
3737
```terraform
3838
provider "cloudfoundry" {
3939
api_url = "https://api.cf.${var.region}-001.hana.ondemand.com"
40+
origin = var.idp
4041
}
4142
```
42-
Save your changes.
43+
Save your changes after editing the file.
44+
The `origin` (Identity Provider Orgin Key ) is set to null. If a [Custom Identity Provider](https://help.sap.com/docs/btp/sap-business-technology-platform/log-on-with-custom-identity-provider-to-cloud-foundry-environment-using-cloud-foundry-command-line-interface) is used to login to SAP BTP CloudFoundry Environment, this value is set to Orgin Key of the Custom Identity Provider. The `api_url ` is the API URL of SAP BTP CloudFoundry Environment.
45+
4346

4447
> [!WARNING]
4548
> We assume that the Cloud Foundry environment is deployed to the extension landscape 001. If this is not the case the authentication might fail. In a real-world scenario you would probably have a different boundary of content to the module.

0 commit comments

Comments
 (0)