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: 
lechnerc77
Product and Topic Expert
Product and Topic Expert

Say hello to release 1.1.0

Sticking to the promised monthly release cycle we published version 1.1.0 of the Terraform provider for SAP BTP yesterday.  Time to check what features have been added since version 1.0.0.

We did some work “under the hood” to improve cross-functional qualities of the provider. While this is an important part of the development and improves the overall quality of the provider, we of course want to provide new features especially when requested by the you. Let’s check them out!

The perfect stop to find out is the release notes in the GitHub repository:

release_notes.png

Time to explore what is hidden behind these exciting new features, right?

Enabling of Features for Directories

With release 1.0.0 you could already create directories with and without enabling features. But what if you created a directory without enabled features like entitlements or authorizations and then you decide to change that? Let’s try it out, by first creating a simple directory without any features:

dir_feat_change1.png

That worked:

dir_feat_change1b.png

Now we want to change this to a managed directory and enable the entitlements and authorizations feature. We adjust the Terraform configuration accordingly:

dir_feat_change2a.png

Applying this change with version 1.0.0 results in an error:

dir_feat_change2.png

Release 1.1.0 to the rescue! After upgrading the provider to version 1.1.0 this change will be supported:

dir_feat_change3.png

This is of course reflected in the directory on SAP BTP:

dir_feat_change4.png

Especially when starting with the SAP BTP and being unsure on how to deal with features on directories your account setup this new feature can help you a lot.

Show Hierarchy of Global Account

The next feature we added is the option to display the hierarchy under a global account. Let us assume that you have a more complex setup with nested directories and subaccounts like this:

dirhierarchy_2.png

Up to now you could manage this hierarchies via the Terraform provider:

dirhierarchy_1.png

Up to now you could manage this hierarchies via the Terraform provider:

dirhierarchy_1.png

But what if you want to analyze the setup e.g., to check naming conventions in complex setups. Although there have been data sources for directories and subaccounts, you had to manually iterate through them, which can become cumbersome.

With release 1.1.0 we added a new data source called “btp_globalaccount_with_hierarchy” that returns you the complete hierarchy. Let us try that out:

dirhierarchy_3a.png

This data source returns a nested structure displaying the nested setup we set up before:

dirhierarchy_3.png

That looks nice, but how can I make use of that complex structure? Did you know that you can access the Terraform output and transfer it into JSON which you can then use e.g., via jq? You can.

Let us execute the “terraform output” command, add the “-json” option and stream the output into a local JSON file:

dirhierarchy_4a.png

The result is:

dirhierarchy_4.png

Just another data source at a first glance, but this can help you a lot when you must do the analysis of existing setups.

User Agent Configuration

The “old” Terraform SDK offered the option to provide additional information via the user agent header when calling the backend APIs. The new plugin framework that we use does not offer this feature (yet?). To close the gap, we added a custom parameter in release 1.1.0 that allows you to add such information to the header. You can use the “BTP_APPEND_USER_AGENT” environment variable to provide this information as described in the documentation:

custom_user_agent.png

One scenario that could make use of this is the usage of the Terraform provider for bridge implementations like Crossplane.

One more thing …

… not feature wise, but contributor wise. As you can see on the release note we have a lot of first-time contributors that provided these features to you:

contributors.png

Thanks a lot for improving the provider – keep up the great work!

How to update?

The update of the provider version is straightforward. Depending on your configuration in the provider, you must adjust the version constraint to 1.1.0 and execute a “terraform init -upgrade”.

That’s it.

All new resources are documented in the Terraform registry: https://registry.terraform.io/providers/SAP/btp/latest

Feedback, questions, bugs, feature requests

Same procedure as before: if you want to interact with us, use the GitHub repository https://github.com/SAP/terraform-provider-btp:

  • To file a bug, please open an issue in the repository.

  • To file a feature request, please file it in the repository.

  • If you have a question, want to discuss ideas or do some “show & tell”, feel free to start a GitHub Discussion.

There are also some feature requests open that you can vote for. Check for the issues that are label as “enhancement” and “pending decision“ via this link https://github.com/SAP/terraform-provider-btp/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement+labe... .

Your votes help us to prioritize our work.

What’s next?

Do you want a sneak peek what is coming next and when we plan to deliver a next release? You find that information in the milestones on our GitHub repository https://github.com/SAP/terraform-provider-btp/milestones

Be aware that plans and dates might change through the course of development.

With that … happy Terraforming!