To execute the exercises, you have the following options concerning the required tools installed:
You find details about the installation of the tools in the following sections
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.
You can then clone the repository via the following command:
git clone https://github.com/SAP-samples/teched2024-XP280.git
you find the exercises in the folder exercises
.
You can install the required tools locally on your machine. The following tools are required:
- Terraform CLI
- An editor of your choice. We recommend Visual Studio Code with the Terraform extension.
As an alternative to the local installation, you can use the provided dev container that contains all required tools. This requires that you have Docker installed on your machine. In addition you need the dev container extension for Visual Studio Code. You can find detailed instructions about the setup here.
To start a dev container Docker must be running on your machine.
To use the dev container you must open the folder that contains the cloned repository in Visual Studio Code.
You will be then asked if you want to reopen the folder in the dev container. Don't do that yet. BEFORE YOU DO, you should store your account details for the container environment by creating a devcontainer.env
file in the .devcontainer/
directory (not the .devcontainer/with_env_file/
directory), with the following two environment variables defined in the file, as shown:
BTP_USERNAME=<your SAP BTP username>
BTP_PASSWORD=<your SAP BTP password>
Now you can (re)open the folder in the dev container:
-
Open the command palette in Visual Studio Code:
- Windows / Linux:
Ctrl + Shift + P
- Mac:
Cmd + Shift + P
- Windows / Linux:
-
Enter
Dev Containers: Reopen in Container
and confirm withEnter
. -
You will then be asked to select a dev container. Select the
TechEd 2024 XP280
container - the one marked "(with .env file)" if you have created adevcontainer.env
file as described earlier):
The dev container will automatically start and you are ready to go.
To use Codespaces you must have a GitHub account. If you don't have one so far, please sign-up on GitHub before going through the exercises.
You can then access the Codespace following these steps:
-
Click on this button and create the code space:
-
A configuration overview will be opened in the browser. You can adjust the region to a location near you (1) and confirm the creation of the Codespace (2):
This will take a few minutes. Be patient 🙂
-
While the Codespace is created for you, you will see this screen
-
Once all is done, you are in your Codespace.
Important
GitHub codespaces are free for a certain amount of time per month. For the hands-on session the free time is more than enough. Don't forget to delete your codespace again after the hands-on session!
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. Export the following environment variables (ensuring that, as shown, the password value is enclosed in single quotes - this is because the shell may interpret special characters in your password and the value will then not be correct):
-
Linux/MacOS/Dev Containers/GitHub Codespaces:
export BTP_USERNAME=<your SAP BTP username> export BTP_PASSWORD='<your SAP BTP password>'
-
Windows:
$env:BTP_USERNAME=<your SAP BTP username> $env:BTP_PASSWORD='<your SAP BTP password>'
If you are using the recommended Dev Container option, and have created the
devcontainer.env
file as described, these environment variables should already be set once you have "re-opened in container".
Validate that the values are set via:
- Windows:
$env:BTP_USERNAME
and$env:BTP_PASSWORD
- Linux/MacOS/GitHub Codespaces:
echo $BTP_USERNAME
andecho $BTP_PASSWORD
We are going to provision several resources like entitlements and subscriptions through the course of this hands-on. As we are working in a trial account there might be limitations e.g., concering the available quotas.
If you created a new trial account, you could delete the existing subaccount from the global account, so that you start from an empty global account
If you have already been working with your SAP BTP trial account, make sure that the entitlements for the following services/application and plan combinations are available:
Service/Application | Plan |
---|---|
build-code | free |
sapappstudiotrial | trial |
process-automation | free |
Warning
If you have the plans already in use in a different subaccount the execution of Terraform will fail due to missing available entitlements
You've now prepared your development environment and have all information to finally start using Terraform provider for SAP BTP.
Continue to - Exercise 1 - Setup Basics of Terraform Configuration.