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

IBM Consulting augments expertise with AWS Competencies: A win-win for clients 

3 min read - In today's dynamic economic landscape, businesses demand continuous innovation and speed of execution. At IBM Consulting®, our unwavering focus on partnerships and shared commitment to delivering enterprise-level solutions to mutual clients have been core to our success.   We are thrilled to announce that IBM® has recently gained five competencies from Amazon Web Services (AWS) in vital domains including Cloud Operations, Internet of Things (IoT), Life Sciences, Mainframe Modernization, and Telecommunications. With these credentials, IBM further establishes its position as a…

Probable Root Cause: Accelerating incident remediation with causal AI 

5 min read - It has been proven time and time again that a business application’s outages are very costly. The estimated cost of an average downtime can run USD 50,000 to 500,000 per hour, and more as businesses are actively moving to digitization. The complexity of applications is growing as well, so Site Reliability Engineers (SREs) require hours—and sometimes days—to identify and resolve problems.   To alleviate this problem, we have introduced the new feature Probable Root Cause as part of Intelligent Incident…

Reflecting on IBM’s legacy of environmental innovation and leadership

4 min read - Upholding a legacy of more than 50 years of environmental responsibility through our company’s actions and commitments, IBM continues to be a leader in driving sustainability for our business, our communities and our clients—including a 34-year history of annual, public environmental reporting, which we continue today. As a hybrid cloud and artificial intelligence (AI) company, we believe that leveraging technology is key to unlocking impact, and it will play a substantial role in how society addresses, adapts to, and overcomes…

IBM Newsletters

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