Supercharge your business-critical IBM Cloud infrastructure deployment with Terraform modules.

IBM Cloud Schematics is excited to announce the general availability of reusable Terraform modules for IBM Cloud to rapidly build your IBM Cloud Infrastructure.

If you have used the IBM Cloud Provider plugins for Terraform to develop Terraform configuration files for your team or organization, you may have asked: “What if there was a curated collection of Terraform modules that could be used to assemble and build the complex cloud infrastructure instead of trying to learn and navigate through a multitude of Terraform resources and data sources?”

Luckily, there is — you can now use the collection of Terraform modules for IBM Cloud built by automation experts within IBM who are constantly validating and keeping them updated for use in the IBM Cloud.

What are Terraform modules for IBM Cloud?

Terraform modules are the logical groupings of Terraform configuration files developed based on common infrastructure code patterns, best practices and reference architectures with which you are developing. You can learn more about Terraform modules here.

The benefits of using Terraform modules for IBM Cloud include the following:

  • Accelerates the development of Terraform infrastructure code for IBM Cloud.
  • Lowers the skill barrier required to develop Terraform code for IBM Cloud and reduces the complexity of the Terraform infrastructure code.
  • Adopts up-to-date industry best practices and infrastructure code patterns that are codified by the automation subject matter experts from IBM.
  • Open-sourced and validated modules, which reduce the scope of testing needed to ensure proper function.
  • Full IBM support for these Terraform modules for any issues that may arise.

The following are the IBM Terraform modules that are published in the Terraform registry:

Note:

  • The growing list of modules is sourced from the Git repositories published here, which act as the authorized source of Terraform modules for IBM Cloud.
  • Work is underway to migrate Terraform modules from other IBM sources — from their public repositories into this authorized Git repository for IBM Cloud.
  • IBM Cloud Schematics will maintain and support the Terraform modules in these repositories only, please raise your issues, defects, and enhancement requests here.

Getting started with Terraform modules

Let us see how Terraform modules improve the developer’s experience while developing a Terraform configuration file for the following deployment architecture:

As a developer, you have to read and understand about using IBM Cloud Terraform provider resources and data sources to set up and configure a Virtual Private Cloud (VPC), Cluster, Identity Access Management (IAM), Key Management System (KMS), Cloud Object Storage (COS) buckets and the dependencies between the Cluster resources and the Observability resources. In each of the following services, you must configure the corresponding resources:

  • VPC resources: Subnet, address prefix, public gateway, security group and security group rules
  • Cluster resources: VPC cluster, VPC worker pools
  • Observability resources: Log Analysis and Monitoring service instances
  • Other supported resources: Key Protect (or KMS), COS, COS bucket, IAM authorisation policies
  • Bindings between resources: Cluster and observability 

This result is more than 1,500 lines of Terraform configuration code, comprised of Terraform resources and data sources. This is a time-consuming and error-prone process during the development cycle, where every iteration of development involves significant amounts of debugging and testing time.

On the other hand, if you use these Terraform modules for deploying the same deployment architecture resources, you will notice that the entire template is a simple assembly of pre-validated Terraform resources. 

Here is a sample Terraform template that provisions a secure Red Hat Openshift cluster with less than 200 lines of code that can be verified incrementally and seamlessly for the given architecture. You can be sure that the resulting IBM Cloud infrastructure built by using Terraform modules incorporates industry best practices and follows the guidelines prescribed by both HashiCorp and IBM Cloud.

The current release includes the modules for some of the most popular services in the IBM Cloud (as listed in the table above). The future may include Terraform modules for services like Certificate Manager, IBM Cloud Internet Services, IBM Cloud Paks, IBM Key Protect for IBM Cloud, IBM Cloud Hyper Protect Crypto Service, IBM Cloud Satellite and more.

What’s next?

The above was a sample deployment architecture using resources powered by Terraform modules to build a secure Red Hat Openshift cluster on IBM Cloud. You can also deep dive into other examples, such as the observability template that uses the corresponding Terraform modules. Refer to these examples while developing your own Terraform templates for your projects. 

If you have questions or comments, check out Getting help and support.

More from Announcements

Success and recognition of IBM offerings in G2 Summer Reports  

2 min read - IBM offerings were featured in over 1,365 unique G2 reports, earning over 230 Leader badges across various categories.   This recognition is important to showcase our leading products and also to provide the unbiased validation our buyers seek. According to the 2024 G2 Software Buyer Behavior Report, “When researching software, buyers are most likely to trust information from people with similar roles and challenges, and they value transparency above other factors.”  With over 90 million visitors each year and hosting more than 2.6…

Manage the routing of your observability log and event data 

4 min read - Comprehensive environments include many sources of observable data to be aggregated and then analyzed for infrastructure and app performance management. Connecting and aggregating the data sources to observability tools need to be flexible. Some use cases might require all data to be aggregated into one common location while others have narrowed scope. Optimizing where observability data is processed enables businesses to maximize insights while managing to cost, compliance and data residency objectives.  As announced on 29 March 2024, IBM Cloud® released its next-gen observability…

Unify and share data across Netezza and watsonx.data for new generative AI applications

3 min read - In today's data and AI-driven world, organizations are generating vast amounts of data from various sources. The ability to extract value from AI initiatives relies heavily on the availability and quality of an enterprise's underlying data. In order to unlock the full potential of data for AI, organizations must be able to effectively navigate their complex IT landscapes across the hybrid cloud.   At this year’s IBM Think conference in Boston, we announced the new capabilities of IBM watsonx.data, an open…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters