You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: released/SAP-Inside-Tracks/SITBLR_DEC_2024/exercises/EXERCISE4/README.md
+15-20Lines changed: 15 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ In this section, we will create a Cloud Foundry environment in the subaccount us
8
8
9
9
The Cloud Foundry Application Runtime service needs to be entitled to the subaccount. To achieve this, add the following resource to your Terraform configuration:
10
10
11
-
### Step 1: Add the module to the Terraform configuration
11
+
### Step 1: Add the resources to the Terraform configuration for cloudfoundry setup
12
12
13
13
First we need to add one more local variable in the `main.tf` file. Open the `main.tf` file and add the following code to the `locals` block:
As we are using the output variables of the module, we need to adjust the output variables in the `outputs.tf` file. Open the `outputs.tf` file and add the following code:
50
+
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:
We reference the output variables of the module via the `module` keyword. Save the changes.
60
-
61
59
### Step 4: Adjust the provider configuration
62
60
63
61
As we are using an additional provider we must make Terraform aware of this in the `provider.tf` file. Open the `provider.tf` file and add the following code to the `required_provider` block:
@@ -103,7 +100,7 @@ To fulfill all requirements for the authentication against the Cloud Foundry env
103
100
104
101
### Step 3: Apply the changes
105
102
106
-
As we have a new provider and a new module in place, we need to re-initialize the setup to download the required provider and module. Run the following command:
103
+
As we have a new provider in place, we need to re-initialize the setup to download the required provider and module. Run the following command:
107
104
108
105
```bash
109
106
terraform init
@@ -146,9 +143,9 @@ You can also check that everything is in place via the SAP BTP cockpit. You shou
146
143
147
144
## Creation of a Cloud Foundry space
148
145
149
-
As a last task we also want to add a Cloud Foundry space to the Cloud Foundry environment. We will use the same concept as before and leverage a module. Navigate to the `modules` folder in the root of this repo and you will find the fitting module at [environments/cloudfoundry/space_cf](../../modules/environment/cloudfoundry/space_cf/README.md).
146
+
As a last task we also want to add a Cloud Foundry space to the Cloud Foundry environment.
150
147
151
-
### Step 1: Add the space name variable to the configuration
148
+
### Step 1: Add the variable to the configuration for Space creation
152
149
153
150
First we need to add more variable in the `variables.tf` file. Open the `variables.tf` file and add the following code:
This allows us to specify the name of the Cloud Foundry space. We also define a default value (`dev`) for the variable. Save the changes.
200
197
201
-
### Step 2: Add the module to the Terraform configuration
198
+
### Step 2: Cloudfoundry Space Creation and Role Assignments
202
199
203
-
To trigger the creation of a Cloud Foundry space and space roles, we add the module to the `main.tf` file. Open the `main.tf` file and add the following code:
200
+
To trigger the creation of a Cloud Foundry space and space roles, Open the `main.tf` file and add the following code:
As we have all prerequisites already in place when it comes to provider configuration and authentication. However, we need to reinitialize the module that we use. To achieve that run the following command:
242
+
Now we can add `space developers`and `space managers`to the space we created, Add following variables to your `tfvars` file.
0 commit comments