This repository contains Terraform scripts to setup an SAP BTP subaccount using the SAP BTP Terraform provider for Joule Studio within an exising Global account with Custom Identity Provider (Cloud Identity Services). It automatically sets up SAP Build Process Automation build-default plan, Joule standard plan, Cloud foundry, Role Collections, trust with custom IDP and more.
main.tf: Provider configuration (BTP and Cloud Foundry)variables.tf: Input variables for subaccountterraform.tfvars: Configurable input variables with valuessubaccount.tf: Subaccount creation with subdomain sanitization logicservices.tf: Subaccount entitlements and subscriptions for services(Joule, BPA, WZ, Roles, Role Collections)
This Terraform configuration provisions the following resources:
| Resource | Description |
|---|---|
| Subaccount | New BTP subaccount with custom IDP trust |
| Cloud Foundry | CF environment with org and dev space |
| SAP Build Process Automation | Subscription (build-default plan) |
| Joule Studio | Subscription with standard plan |
| SAP Build Work Zone | Standard (free) |
| Role Collections | ProcessAutomationAdmin, ProcessAutomationDeveloper, Joule_Studio, Launchpad_Admin |
Estimated time: ~20-30 minutes for full provisioning of resources
Before using this template, ensure you have:
| Requirement | Description |
|---|---|
| BTP Global Account | With Global Account Administrator access |
| Entitlements | Joule (standard plan) and Build Process Automation (build-default plan) |
| SAP Cloud Identity Services | IAS tenant for your global account |
| Platform User | SAP ID Service credentials for Terraform authentication |
- Go to BTP Cockpit → Global Account → Account Explorer
- Click on any existing subaccount
- Navigate to Security → Trust Configuration
- Look for an entry like
xxxxx.accounts.ondemand.comand Copy the domain (e.g.,abc123xy.accounts.ondemand.com) - You will need this url in
Step 3of Setup and Configuration section
Don't have a custom IDP? Most BTP accounts include SAP Cloud Identity Services. If missing, contact your administrator to enable it for your global account.
- Click Use this template button on this repository and choose Create a new repository
- Provide a repo name, make visibility of your repo as Private and select Create repository
- Update the
terraform.tfvarswith your global account subdomain and identity_provider and commit the change. This is one time update.
globalaccount = "xxx-xxxx-xxxx-xxxx-xxx"
identity_provider = "xxxxx.accounts.ondemand.com"-
Add 2 Secrets from Settings → Secrets and variables → Actions → Secrets → New repository secret :
BTP_USERNAME- Your BTP emailBTP_PASSWORD- Your BTP password
Note: The BTP username and password provided here should have administrator access within the global account mentioned in Step 3.
-
Add 2 Variables from Settings → Secrets and variables → Actions → Variables → New repository variable :
SUBACCOUNT_NAME- e.g.,my-joule-studioSUBACCOUNT_REGION- e.g.,eu10
Note: These variables must be updated for each new subaccount since subaccount names must be unique and the region must be a Joule supported data center. By storing them as GitHub variables, they can be modified without changing the Terraform scripts(.tf files).
- Go to Actions → Terraform Deploy → Run workflow → From
Terraform action to performdropdown, selectapply→ Run workflow :
- Monitor the deployment from the Actions tab
The last step to complete the Joule Studio setup is to create a Joule Formation. By creating a formation, you logically group multiple systems and services together so they can work as a unified solution. The Formation is what makes Joule aware of the connected systems and able to orchestrate across them. Unfortunately, this cannot be automated via Terraform yet, so run the Joule booster after running the Terraform script to perform this step automatically.
No known issues at this time.
- SAP BTP Terraform Provider
- Learning journey and MOOC Course GH repo
- Run Joule Booster and Step by Step Video
- SAP help documentation and SAP Community blog post
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
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) 2026 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.




