[[{“value”:”
Automate Everything: A Deep Dive into SAP BTP’s Scripting & Automation Preview
Introduction
If you have ever set up an SAP BTP subaccount manually — clicking through the cockpit, filling in forms, waiting for confirmations — you know how repetitive and error-prone that process can be, especially at scale. SAP BTP has quietly introduced a game-changing feature right inside the BTP Cockpit: Scripting & Automation Preview.
This feature bridges the gap between point-and-click administration and true infrastructure-as-code, giving developers and platform engineers an instant script for every action they take in the cockpit — in SAP BTP CLI, Cloud Foundry CLI, and Terraform flavors.
What Is Scripting & Automation Preview?
Scripting & Automation Preview is a contextual code panel built directly into the SAP BTP Cockpit. For every page you are on — subaccount overview, entitlements, Cloud Foundry environments, service instances — the panel displays the equivalent SAP BTP CLI, Cloud Foundry CLI, and Terraform commands automatically. Crucially, it updates in real time as you navigate: no refresh, no manual lookup, no copy-pasting values from the UI into a docs page.
The panel is accessible via the <> icon in the top-right corner of the BTP Cockpit toolbar (see the screenshot below — it is highlighted in the navigation bar). Once activated, it docks at the bottom of the screen. As you move from one cockpit page to another, the panel silently updates its content to match your current context, making the transition from UI-based actions to scripted or infrastructure-as-code workflows completely frictionless — with no manual research required.
The Scripting & Automation Preview panel in the SAP BTP Cockpit, showing CLI commands auto-generated for a Global & subaccount
The Six Tabs — What Each One Gives You
The panel is organized into six tabs across three scripting paradigms, each serving a specific use case in the DevOps and platform engineering workflow:
SAP BTP CLI
1. CLI
The CLI tab generates ready-to-run SAP BTP CLI (btp) commands for the resource currently in view. This is the primary CLI for managing BTP platform resources — global accounts, subaccounts, entitlements, and environments.
For the “Mars” subaccount shown in the screenshot, it generates three commands automatically:
# Get the current subaccount
btp get accounts/subaccount "10a...8a2f15"
# Create the subaccount
btp create accounts/subaccount
--display-name "Mars"
--region "eu11"
--subdomain "mars"
--beta-enabled "true"
# Update the subaccount
btp update accounts/subaccount "1...15"
--display-name "Mars"
--beta-enabled "true"
Each command block has a “View Documentation” link alongside it — so you can jump straight to the official BTP CLI reference for that specific command. No more hunting through docs to find the right flag.
2. CLI Setup
The CLI Setup tab provides the prerequisite setup commands needed before the BTP CLI commands will work — things like installing the BTP CLI, logging in to your global account, and targeting the right subaccount. This is invaluable for onboarding new team members or setting up CI/CD pipelines from scratch.
Cloud Foundry CLI
3. CF CLI
The CF CLI tab generates Cloud Foundry CLI (cf) commands for the current cockpit page. Where the BTP CLI covers platform-level resources (subaccounts, entitlements, service subscriptions), the CF CLI covers runtime-level resources: orgs, spaces, apps, services, buildpacks, routes, and environment variables.
For a Cloud Foundry environment page, the panel might surface commands like:
# Target the Cloud Foundry org and space
cf login -a "https://api.cf.eu11.hana.ondemand.com"
cf target -o "my-org" -s "dev"
# Create a Cloud Foundry space
cf create-space "dev" -o "my-org"
This is particularly valuable because the cf command surface is vast, and remembering the exact syntax for service binding, role assignment, or environment variable management is non-trivial. The panel handles that for you.
4. CF CLI Setup
The CF CLI Setup tab provides the commands needed to install and authenticate the Cloud Foundry CLI — including the API endpoint specific to your BTP region — so a new pipeline or developer machine can be configured with a single copy-paste.
Terraform
5. Terraform
The Terraform tab generates a Terraform HCL (HashiCorp Configuration Language) configuration block equivalent to the current cockpit state. This is the bridge between the visual cockpit and infrastructure-as-code:
resource "btp_subaccount" "mars" {
display_name = "Mars"
subdomain = "mars"
region = "eu11"
beta_enabled = true
}
With this output, you can bootstrap your Terraform codebase directly from the cockpit without having to manually author resource blocks from scratch.
6. Terraform Setup
The Terraform Setup tab gives you the provider configuration and backend setup code needed to get Terraform running with the SAP BTP Terraform Provider. It includes the required_providers block and authentication setup — removing all the boilerplate research.
A note on tabs visible in the screenshot: The screenshot shows four tabs — CLI, CLI Setup, Terraform, and Terraform Setup. The Cloud Foundry CLI tabs appear contextually when you navigate to a Cloud Foundry environment page within your subaccount. The full panel adapts its available tabs based on what resource type is currently in view.
Why This Feature Matters
For Platform Engineers: Shift Left on Automation
Historically, BTP Admins or teams would set up BTP resources manually in the cockpit during a project’s early phases and only later “clean up” by writing CLI scripts or Terraform configs. The Scripting & Automation Preview collapses that timeline. You can write automation from day one — with zero risk of the script diverging from what was actually provisioned, because the cockpit generates it from the live resource state.
For Developers: No More CLI Reference Hunting
The BTP CLI is powerful but has hundreds of commands and flags. Remembering the exact syntax for btp create accounts/subaccount — including all the required and optional parameters — is a cognitive burden. With this feature, the cockpit tells you the exact command to run, pre-filled with the real values of your current resource.
For DevOps Teams: Reproducible Environments
One of the hardest problems in BTP operations is reproducibility. “Works in dev, doesn’t work in prod” often traces back to configuration drift. When you can generate the exact Terraform or CLI script from a known-good environment, you get a reliable blueprint for spinning up identical environments elsewhere.
For Auditors and Compliance Teams
Every command the panel generates corresponds to a real API call against the BTP accounts service. Combined with the Open in Audit Log Viewer link visible in the subaccount overview, you have a complete trail from human intention → machine command → audit log.
A Real-World Scenario: Bootstrapping a New Subaccount
Let me walk through exactly how this feature speeds up a real task.
Scenario: You need to create a new “Production” subaccount mirroring the “Mars” dev subaccount, in the same region, with the same settings.
Old way (15–20 minutes):
- Open BTP Cockpit.
- Navigate to the global account.
- Click “Create Subaccount”, fill in the form.
- Separately, open BTP CLI docs and find
btp create accounts/subaccount. - Write the command manually, referring to the form values.
- Copy the command into your runbook or automation script.
New way with Scripting & Automation Preview (2–3 minutes):
- Open the “Mars” subaccount in BTP Cockpit.
- Click the
<>icon to open the Scripting & Automation panel. - Copy the Create Subaccount CLI command from the CLI tab.
- Adjust
--display-nameand--subdomainfor production. - Run or paste into your pipeline script.
The Terraform tab gives you an equivalent HCL block you can drop straight into your main.tf.
Beta Features: Why It’s Enabled
Notice in the screenshot that Beta Features: Enabled is shown for the Mars subaccount. The Scripting & Automation Preview is currently in preview/beta status — you need beta features enabled at the subaccount level to access it. This is straightforward to enable via:
btp update accounts/subaccount <subaccount-id> --beta-enabled "true"
Ironically, the panel itself shows you this command once beta is enabled — self-referential and elegant.
Getting Started
Here’s what you need to begin using Scripting & Automation Preview:
| Step | Action |
| 1 | Log in to SAP BTP Cockpit |
| 2 | Navigate to your target subaccount |
| 3 | Enable Beta Features in subaccount settings |
| 4 | Click the <> icon in the top-right toolbar |
| 5 | Navigate your resources — the panel updates automatically |
| 6 | Copy commands from CLI, Terraform, or their respective setup tabs |
Current Scope and Limitations
As with any preview feature, there are things to be aware of:
- Preview status means the generated scripts should be reviewed before being used in production pipelines — commands, flags, and Terraform resource schemas may evolve as the feature matures.
- Coverage across resource types is expanding with each BTP Cockpit release. Some edge-case configurations may not yet have complete equivalents in all three scripting paradigms.
- The panel’s tabs adapt to context: BTP CLI tabs appear for subaccount/entitlement pages, CF CLI tabs appear for Cloud Foundry environment pages. Not all tab types are visible on every page — this is by design, not a gap.
- Copy-paste is currently the primary integration mechanism. Direct export to a file or a Git repository would be a powerful next step.
What’s Next?
The direction this feature points toward is clear: SAP wants every action in the BTP Cockpit to be scriptable by default. The logical next steps could include:
- Session recording — capture a full sequence of cockpit actions as a single script or Terraform plan.
- Export to file — download the generated scripts directly rather than copy-pasting.
- CI/CD integration — push generated configs directly to a connected Git repository.
- Drift detection — compare the live cockpit state against a stored Terraform state file and highlight differences.
Conclusion
Scripting & Automation Preview is one of those features that sounds simple but has significant implications for how teams manage BTP infrastructure. It removes friction from the shift to infrastructure-as-code, accelerates developer onboarding, and makes reproducibility a default rather than an afterthought.
The feature’s core design principle is elegant: whatever page you are on, the cockpit tells you how to do it from the command line or in code — automatically, without you asking. SAP BTP CLI for platform resources. Cloud Foundry CLI for runtime resources. Terraform for everything you want to version-control and replay. The panel stays in sync as you navigate, so you never lose context.
If you are running SAP BTP with beta features enabled, open the <> panel the next time you configure a subaccount or set up a Cloud Foundry space. Within minutes, you will have ready-to-run CLI commands and Terraform blocks — generated from the live state of your environment, pre-filled with real values, and linked directly to the official documentation.
That is not just convenient. That is a fundamentally better way to operate cloud infrastructure.
“}]]
[[{“value”:”Automate Everything: A Deep Dive into SAP BTP’s Scripting & Automation PreviewIntroductionIf you have ever set up an SAP BTP subaccount manually — clicking through the cockpit, filling in forms, waiting for confirmations — you know how repetitive and error-prone that process can be, especially at scale. SAP BTP has quietly introduced a game-changing feature right inside the BTP Cockpit: Scripting & Automation Preview.This feature bridges the gap between point-and-click administration and true infrastructure-as-code, giving developers and platform engineers an instant script for every action they take in the cockpit — in SAP BTP CLI, Cloud Foundry CLI, and Terraform flavors.What Is Scripting & Automation Preview?Scripting & Automation Preview is a contextual code panel built directly into the SAP BTP Cockpit. For every page you are on — subaccount overview, entitlements, Cloud Foundry environments, service instances — the panel displays the equivalent SAP BTP CLI, Cloud Foundry CLI, and Terraform commands automatically. Crucially, it updates in real time as you navigate: no refresh, no manual lookup, no copy-pasting values from the UI into a docs page.The panel is accessible via the <> icon in the top-right corner of the BTP Cockpit toolbar (see the screenshot below — it is highlighted in the navigation bar). Once activated, it docks at the bottom of the screen. As you move from one cockpit page to another, the panel silently updates its content to match your current context, making the transition from UI-based actions to scripted or infrastructure-as-code workflows completely frictionless — with no manual research required.The Scripting & Automation Preview panel in the SAP BTP Cockpit, showing CLI commands auto-generated for a Global & subaccount The Six Tabs — What Each One Gives YouThe panel is organized into six tabs across three scripting paradigms, each serving a specific use case in the DevOps and platform engineering workflow:SAP BTP CLI1. CLIThe CLI tab generates ready-to-run SAP BTP CLI (btp) commands for the resource currently in view. This is the primary CLI for managing BTP platform resources — global accounts, subaccounts, entitlements, and environments.For the “Mars” subaccount shown in the screenshot, it generates three commands automatically:# Get the current subaccount
btp get accounts/subaccount “10a…8a2f15”
# Create the subaccount
btp create accounts/subaccount
–display-name “Mars”
–region “eu11”
–subdomain “mars”
–beta-enabled “true”
# Update the subaccount
btp update accounts/subaccount “1…15”
–display-name “Mars”
–beta-enabled “true”
Each command block has a “View Documentation” link alongside it — so you can jump straight to the official BTP CLI reference for that specific command. No more hunting through docs to find the right flag.2. CLI SetupThe CLI Setup tab provides the prerequisite setup commands needed before the BTP CLI commands will work — things like installing the BTP CLI, logging in to your global account, and targeting the right subaccount. This is invaluable for onboarding new team members or setting up CI/CD pipelines from scratch.Cloud Foundry CLI3. CF CLIThe CF CLI tab generates Cloud Foundry CLI (cf) commands for the current cockpit page. Where the BTP CLI covers platform-level resources (subaccounts, entitlements, service subscriptions), the CF CLI covers runtime-level resources: orgs, spaces, apps, services, buildpacks, routes, and environment variables.For a Cloud Foundry environment page, the panel might surface commands like:# Target the Cloud Foundry org and space
cf login -a “https://api.cf.eu11.hana.ondemand.com”
cf target -o “my-org” -s “dev”
# Create a Cloud Foundry space
cf create-space “dev” -o “my-org”
This is particularly valuable because the cf command surface is vast, and remembering the exact syntax for service binding, role assignment, or environment variable management is non-trivial. The panel handles that for you.4. CF CLI SetupThe CF CLI Setup tab provides the commands needed to install and authenticate the Cloud Foundry CLI — including the API endpoint specific to your BTP region — so a new pipeline or developer machine can be configured with a single copy-paste.Terraform5. TerraformThe Terraform tab generates a Terraform HCL (HashiCorp Configuration Language) configuration block equivalent to the current cockpit state. This is the bridge between the visual cockpit and infrastructure-as-code:resource “btp_subaccount” “mars” {
display_name = “Mars”
subdomain = “mars”
region = “eu11”
beta_enabled = true
}With this output, you can bootstrap your Terraform codebase directly from the cockpit without having to manually author resource blocks from scratch.6. Terraform SetupThe Terraform Setup tab gives you the provider configuration and backend setup code needed to get Terraform running with the SAP BTP Terraform Provider. It includes the required_providers block and authentication setup — removing all the boilerplate research.A note on tabs visible in the screenshot: The screenshot shows four tabs — CLI, CLI Setup, Terraform, and Terraform Setup. The Cloud Foundry CLI tabs appear contextually when you navigate to a Cloud Foundry environment page within your subaccount. The full panel adapts its available tabs based on what resource type is currently in view.Why This Feature MattersFor Platform Engineers: Shift Left on AutomationHistorically, BTP Admins or teams would set up BTP resources manually in the cockpit during a project’s early phases and only later “clean up” by writing CLI scripts or Terraform configs. The Scripting & Automation Preview collapses that timeline. You can write automation from day one — with zero risk of the script diverging from what was actually provisioned, because the cockpit generates it from the live resource state.For Developers: No More CLI Reference HuntingThe BTP CLI is powerful but has hundreds of commands and flags. Remembering the exact syntax for btp create accounts/subaccount — including all the required and optional parameters — is a cognitive burden. With this feature, the cockpit tells you the exact command to run, pre-filled with the real values of your current resource.For DevOps Teams: Reproducible EnvironmentsOne of the hardest problems in BTP operations is reproducibility. “Works in dev, doesn’t work in prod” often traces back to configuration drift. When you can generate the exact Terraform or CLI script from a known-good environment, you get a reliable blueprint for spinning up identical environments elsewhere.For Auditors and Compliance TeamsEvery command the panel generates corresponds to a real API call against the BTP accounts service. Combined with the Open in Audit Log Viewer link visible in the subaccount overview, you have a complete trail from human intention → machine command → audit log.A Real-World Scenario: Bootstrapping a New SubaccountLet me walk through exactly how this feature speeds up a real task.Scenario: You need to create a new “Production” subaccount mirroring the “Mars” dev subaccount, in the same region, with the same settings.Old way (15–20 minutes):Open BTP Cockpit.Navigate to the global account.Click “Create Subaccount”, fill in the form.Separately, open BTP CLI docs and find btp create accounts/subaccount.Write the command manually, referring to the form values.Copy the command into your runbook or automation script.New way with Scripting & Automation Preview (2–3 minutes):Open the “Mars” subaccount in BTP Cockpit.Click the <> icon to open the Scripting & Automation panel.Copy the Create Subaccount CLI command from the CLI tab.Adjust –display-name and –subdomain for production.Run or paste into your pipeline script.The Terraform tab gives you an equivalent HCL block you can drop straight into your main.tf.Beta Features: Why It’s EnabledNotice in the screenshot that Beta Features: Enabled is shown for the Mars subaccount. The Scripting & Automation Preview is currently in preview/beta status — you need beta features enabled at the subaccount level to access it. This is straightforward to enable via:btp update accounts/subaccount <subaccount-id> –beta-enabled “true”
Ironically, the panel itself shows you this command once beta is enabled — self-referential and elegant.Getting StartedHere’s what you need to begin using Scripting & Automation Preview:StepAction1Log in to SAP BTP Cockpit2Navigate to your target subaccount3Enable Beta Features in subaccount settings4Click the <> icon in the top-right toolbar5Navigate your resources — the panel updates automatically6Copy commands from CLI, Terraform, or their respective setup tabsCurrent Scope and LimitationsAs with any preview feature, there are things to be aware of:Preview status means the generated scripts should be reviewed before being used in production pipelines — commands, flags, and Terraform resource schemas may evolve as the feature matures.Coverage across resource types is expanding with each BTP Cockpit release. Some edge-case configurations may not yet have complete equivalents in all three scripting paradigms.The panel’s tabs adapt to context: BTP CLI tabs appear for subaccount/entitlement pages, CF CLI tabs appear for Cloud Foundry environment pages. Not all tab types are visible on every page — this is by design, not a gap.Copy-paste is currently the primary integration mechanism. Direct export to a file or a Git repository would be a powerful next step.What’s Next?The direction this feature points toward is clear: SAP wants every action in the BTP Cockpit to be scriptable by default. The logical next steps could include:Session recording — capture a full sequence of cockpit actions as a single script or Terraform plan.Export to file — download the generated scripts directly rather than copy-pasting.CI/CD integration — push generated configs directly to a connected Git repository.Drift detection — compare the live cockpit state against a stored Terraform state file and highlight differences.ConclusionScripting & Automation Preview is one of those features that sounds simple but has significant implications for how teams manage BTP infrastructure. It removes friction from the shift to infrastructure-as-code, accelerates developer onboarding, and makes reproducibility a default rather than an afterthought.The feature’s core design principle is elegant: whatever page you are on, the cockpit tells you how to do it from the command line or in code — automatically, without you asking. SAP BTP CLI for platform resources. Cloud Foundry CLI for runtime resources. Terraform for everything you want to version-control and replay. The panel stays in sync as you navigate, so you never lose context.If you are running SAP BTP with beta features enabled, open the <> panel the next time you configure a subaccount or set up a Cloud Foundry space. Within minutes, you will have ready-to-run CLI commands and Terraform blocks — generated from the live state of your environment, pre-filled with real values, and linked directly to the official documentation.That is not just convenient. That is a fundamentally better way to operate cloud infrastructure.”}]] Read More Technology Blog Posts by SAP articles
#SAPCHANNEL