Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rui-Nogueira
Product and Topic Expert
Product and Topic Expert
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 mauriciolauffer) 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.

Note:

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 https://github.com/SAP-samples/btp-terraform-samples.

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.

Best,
Rui for the team behind the Terraform provider for SAP BTP
9 Comments
0 Kudos
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?

Brilliant
lechnerc77
Product and Topic Expert
Product and Topic Expert
0 Kudos

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: https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/directory).
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.

Best,
Christian

Nigel_James
Active Contributor
Oh this is great news.
mauriciolauffer
Contributor
Rui, you and the team delivered an awesome tool!!! Thank you for that  😃
jthuijls
Participant
Very nice, will try
nunomcpereira
Explorer
0 Kudos

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?

 

Thanks

Nuno

 

lechnerc77
Product and Topic Expert
Product and Topic Expert
0 Kudos
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.

Best

Christian
0 Kudos
This is a great initiative, Long waited for this one. Does provisioning kyma clusters as part of this provider in the near roadmap as that would be very beneficial for a lot of teams christian.lechner
lechnerc77
Product and Topic Expert
Product and Topic Expert
The management of environment instances for Kyma is already possible:You can use the `subaccount_environment_instance` for that.

Here is the link to the documentation which also contains a example for Kyma. You also find some information about the provisioning in our samples repository.

Be aware that the management of Kubernetes resources must be managed via the Kubernetes provider.