|
| 1 | +# SITBLR DECEMBER 2024 - HandsOn SAP Terraform Provider for SAP BTP |
| 2 | + |
| 3 | +## Goal of this HandsOn 🎯 |
| 4 | + |
| 5 | +In this HandsOn you will learn how to use the [Terraform Provider for SAP BTP](https://registry.terraform.io/providers/SAP/cp/latest/docs) to provision and manage resources in SAP BTP. The level of the exercises is beginner. You don't need any prior knowledge about Terraform or the Terraform Provider for SAP BTP. We will guide you through the exercises step by step. |
| 6 | + |
| 7 | +## Prerequisites 📝 |
| 8 | + |
| 9 | +Make sure that the following prerequisites are met: |
| 10 | + |
| 11 | +- You have an SAP BTP Trial Account. If you don't have one yet, you can get one [here](https://developers.sap.com/tutorials/hcp-create-trial-account.html). |
| 12 | +- Make sure that your SAP Universal ID is configured correctly. You can find the instructions in [SAP Note 3085908](https://me.sap.com/notes/3085908). |
| 13 | +- The Terraform provider does not support SSO or 2FA. Make sure that these options are not enforced for your account. |
| 14 | + |
| 15 | + |
| 16 | +## Tools 🛠️ |
| 17 | + |
| 18 | +To execute the exercises you have the following options concerning the required tools installed: |
| 19 | + |
| 20 | +In general you must clone this GitHub repository. You must have the Git client installed on your machine. You can find the installation instructions [here](https://git-scm.com/downloads). |
| 21 | + |
| 22 | +You can then clone the repository via the following command: |
| 23 | + |
| 24 | +```bash |
| 25 | +git clone https://github.com/SAP-samples/btp-terraform-samples.git |
| 26 | +``` |
| 27 | + |
| 28 | +you find the exercises in the folder `released/SAP-Inside-Tracks/SITBLR_DEC_2024/exercises`. |
| 29 | + |
| 30 | + |
| 31 | +You can install the required tools locally on your machine. The following tools are required: |
| 32 | + |
| 33 | +- [Terraform CLI](https://developer.hashicorp.com/terraform/install?product_intent=terraform) |
| 34 | +- An editor of your choice. We recommend [Visual Studio Code](https://code.visualstudio.com/Download) with the [Terraform extension](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform). |
| 35 | + |
| 36 | + |
| 37 | +## Exporting environment variables |
| 38 | + |
| 39 | +The last step in the setup is the export of the environment variables that are required to authenticate against the Terraform provider for SAP BTP. Fo that export the following environment variables: |
| 40 | + |
| 41 | +- Windows: |
| 42 | + |
| 43 | + ```pwsh |
| 44 | + $env:BTP_USERNAME=<your SAP BTP username> |
| 45 | + $env:BTP_PASSWORD='<your SAP BTP password>' |
| 46 | + ``` |
| 47 | +
|
| 48 | +- Linux/MacOS/GitHub Codespaces: |
| 49 | +
|
| 50 | + ```bash |
| 51 | + export BTP_USERNAME=<your SAP BTP username> |
| 52 | + export BTP_PASSWORD='<your SAP BTP password>' |
| 53 | + ``` |
| 54 | +
|
| 55 | +Validate that the values are set via: |
| 56 | +
|
| 57 | +- Windows: `$env:BTP_USERNAME` and `$env:BTP_PASSWORD` |
| 58 | +- Linux/MacOS/GitHub Codeapses: `echo $BTP_USERNAME` and `echo $BTP_PASSWORD` |
| 59 | +
|
| 60 | +
|
| 61 | +## Summary |
| 62 | +
|
| 63 | +You've now prepared your development environment and have all information to finally start using Terraform provider for SAP BTP. |
| 64 | +
|
| 65 | +
|
| 66 | +
|
| 67 | +## Exercises 📚 |
| 68 | +
|
| 69 | +In this HandsOn we want to make you familiar with the Terraform Provider for SAP BTP. We will use the provider to provision and manage resources in SAP BTP. To achieve this we will walk through the following steps: |
| 70 | +
|
| 71 | +1. [Exercise 1 - Configure the Terraform Provider for SAP BTP](exercises/EXERCISE1/README.md) |
| 72 | +1. [Exercise 2 - Setup of a subaccount](exercises/EXERCISE2/README.md) |
| 73 | +1. [Exercise 3 - Assign entitlement,Subscription and its role assignments to a subaccount](exercises/EXERCISE3/README.md) |
| 74 | +1. [Exercise 4 - Setup a Cloud Foundry environment](exercises/EXERCISE4/README.md) |
| 75 | +1. [Exercise 5 - Create a CloudFoundry Space](exercises/EXERCISE5/README.md) |
| 76 | +1. [Exercise 6 - Cleanup](exercises/EXERCISE6/README.md) |
| 77 | +
|
| 78 | +
|
| 79 | +
|
| 80 | +
|
0 commit comments