This repository contains the code samples used throughout the course "Getting Started with Terraform on SAP BTP".
There are some requirements you must fulfill before being able to start with the coding exercises using the Terraform provider for SAP BTP. The prerequisites are:
- You have an SAP BTP Trial Account. If you don't have one yet, you can get one here.
- Make sure that your SAP Universal ID is configured correctly. You can find the instructions in SAP Note 3085908.
- The Terraform provider does not support 2FA. Make sure that this option is not enforced for your account.
Depending on the setup described in unit 1 lesson 3 further prerequisites are required:
- If you intend to use the recommended 'dev container' tools option you must have Docker Desktop and Visual Studio Code including the Dev Containers extension installed on your machine.
- You want to use A GitHub Codespace you must have a GitHub user. If you don't have one, sign-up on GitHub.
The repository is structured in line with the layout of the course. The walkthrough of the code for every lesson is described in an extensive README.md
. We also provide the solution for each lesson as part of the corresponding directory in this repository.
- Lesson 1 - Configuring the first basic Terraform setup
- Lesson 2 - Applying the Terraform setup to SAP BTP
- Lesson 3 - Inspecting the Terraform state
- Lesson 1 - Using Variables in a Terraform Configuration
- Lesson 2 - Using Locals in a Terraform Configuration
- Lesson 3 - Adding Multiple Resources to the Terraform Configuration
- Lesson 4 - Setting up a Cloud Foundry Environment via Terraform
- Lesson 1 - Enhancing the Setup with Additional Providers
- Lesson 2 - Handing over to the development team
- Lesson 3 - Extracting Reuseable Logic into Modules
- Lesson 4 - Iterating over Lists in Terraform
❓ - If you have a question you can ask it here in GitHub Discussions or in the SAP Community.
🐞 - If you find a bug, feel free to create a bug report.
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.
Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.