Skip to Content
Technical Articles
Author's profile photo Rui Nogueira

Terraform provider for SAP BTP now available for non-productive use

With the increasing adoption of the SAP Business Technology Platform many of our SAP customers asked for ways to automate the setup of their SAP BTP accounts.

So far, they have different options:

  • Use the documented BTP APIs
  • Use the btp CLI (command line interface) to automate single steps in the management of an SAP BTP account and integrate them in scripts to e.g., embed them into their CI/CD pipelines.
  • Use the SAP Automation Pilot that is available in various regions of SAP BTP.
  • Use the community-driven open-source project btp-setup-automator. It combines multiple command line interfaces within a container image and enables you to define complex SAP BTP use cases within a JSON configuration file [see my blog post from last year].

Although you can already do a lot with the options mentioned above, several customers asked for getting support for Terraform. Started by Hashicorp in 2014 as an open-source initiative for infrastructure-as-code, Terraform has become a broadly used standard in the IT industry.

And as you can see in some blog posts (e.g., [ref1, ref2] from our SAP colleague Mauricio Lauffer) there is quite some interest in using Terraform in SAP BTP today.

Scope of Terraform provider for SAP BTP, v0.1.0

To address our customer’s demand SAP provides today the first release v0.1.0-beta1 of the Terraform provider for SAP BTP with a limited scope covering the following capabilities:

  • Create, read, and delete sub accounts
  • Create, read, and delete directories
  • Assign, read, and delete labels (directories, sub accounts)
  • Create, read, and delete roles
  • Create, read, and delete role collections
  • Assign, read, and delete assignment of users to role collections
  • Create, read, and delete service entitlements
  • Assign custom identity providers (global account and sub account)

You will see as well the Terraform provider for SAP BTP in the Terraform registry:


As the release number indicates the Terraform provider for SAP BTP certainly has some rough edges, so we do not recommend a productive usage of this version. Our clear goal for this version is to collect your feedback.


Please keep in mind that Terraform persists the state of the scripts on the machine that is executing them. That state can contain sensitive data. Please keep that in mind and follow the recommendations for Terraform.

First sample code available: Automate SAP BTP withTerraform

In case you are not familiar so far with Terraform, there is a new GitHub repository available with samples and best practices. You find it at

Try it out and get used to Terraform and how you can use the Terraform provider for SAP BTP in real-life use cases.

Extending the scope in the next months

As mentioned before, within the next months, we want to collect feedback from our customers and partners to evaluate v0.1.0 and to ensure that the capabilities provided by the Terraform provider for SAP BTP are covering the customers/partners requirements and fit to their needs.

We target a (roughly) monthly release update. Once we see that the Terraform provider for SAP BTP is ready for productive use, we will provide a v1.0.0 release. Until that point in time, we will continuously evolve the v0.x.x version.

Engage and provide feedback!

To allow a focused discussion and to keep track of raised issues, we ask you to use the GitHub repository for the Terraform provider for SAP BTP.

As usual you can create a bug report and raise a feature requests in the issues section of the GitHub repository.

In addition, you can start or join a discussion within the GitHub repository and exchange your ideas with other developers and the team behind the Terraform provider for SAP BTP.

We are eager to provide you with a great way to connect to SAP BTP via Terraform. Looking forward to all your input.

Rui for the team behind the Terraform provider for SAP BTP

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Javier Rodriguez Prieto
      Javier Rodriguez Prieto

      Hello Rui,


      Many thanks for sharing, i have two questions:


      Is possible to apply terraform import? to add existing objects into state, imagine you created one object in BTP manually and you want to add into the state, do you think is possible? maybe not now, but in the future.

      Another question is, do you know when this it will be available for productive? do you have any roadmap or something like that?


      Author's profile photo Christian Lechner
      Christian Lechner

      Hi Javier,

      we do not yet support the terraform import for every resource, but we are working in that. To see which resources are already supported and what parameters are expected for the import you can check the documentation (see e.g., here:
      You can also check the issues in the GitHub repository to see on which imports we are going to be working on.

      As mentioned in the blog post want to collect user feedback, to improve the provider and give the user the best possible experience once GA. So no date to be communicated yet.


      Author's profile photo Nigel James
      Nigel James

      Oh this is great news.

      Author's profile photo Mauricio Lauffer
      Mauricio Lauffer

      Rui, you and the team delivered an awesome tool!!! Thank you for that  =)

      Author's profile photo Jorg Thuijls
      Jorg Thuijls

      Very nice, will try

      Author's profile photo Nuno Pereira
      Nuno Pereira

      Hi Rui,


      Congrats for the excellent tool!

      I have a couple of questions on this, but I'll try to resume it:

      1) what's the future sap strategy for this tool? To invest on it bringing new features or expecting it to be solely driven by the community?

      2) any plans to extend this tool to popular btp services such as Integration Suite? If iIntegration Suite terraform features are on the roadmap, do you have any dates in mind for that?





      Author's profile photo Christian Lechner
      Christian Lechner

      Hi Nuno,

      thanks for the feedback.

      Ad 1) Our team is working on bringing the provider forward and pushing it towards GA. What is happening and what we are working on is visible in the GitHub repository of the provider. While the major contributions are coming from our core team at SAP the provider is under the Apache 2.0 license so community contributions are welcome. We are also happy to see feedback and questions in the GitHub Discussions available in the repository that help us to improve the provider

      Ad 2) The provider is based on the BTP CLI i.e. we are leveraging the same backend as the BTP CLI. Hence, the provider is capable of working with service instances and applications as you could do with the BTP CLI. We do not have any specifics implemented around the integration suite and have currently no plans to add such specifics to the provider.