Skip to content
Navigation Menu

IBM Cloud

  • CatalogCatalog
  • Cost EstimatorCost Estimator
    • HelpHelp
      • Docs
  • Log in
  • Sign up
  • Catalog
  • Cost Estimator
  • Help
    • Docs

  • Navigation settings

Error

Change theme

This feature is in early stage, some parts of the platform might not fully support different themes yet.

Themes
  1. Catalog

Red Hat OpenShift VPC cluster on IBM Cloud module

Provisions a Red Hat OpenShift VPC cluster on IBM Cloud

  • Date of last update: 05/26/2025
  • Docs
  • Readme file
warning icon
This product is deprecated
Red Hat OpenShift VPC cluster on IBM Cloud module will not be available after 08/24/2025. You can install the product until then.

Module overview

Use this module to provision an IBM Cloud Red Hat OpenShift cluster on VPC Gen2. The module either creates the required Cloud Object Storage instance or uses an existing instance. The module also supports optionally passing a key management configuration for secret encryption and boot volume encryption.

Before you begin

  • Make sure that you have a recent version of the IBM Cloud CLI
  • Make sure that you have a recent version of the IBM Cloud Kubernetes service CLI

Usage

module "ocp_base" {
  # Replace "X.X.X" with a release version to lock into a specific release
  source               = "https://cm.globalcatalog.cloud.ibm.com/api/v1-beta/offering/source?archive=tgz&kind=terraform&name=terraform-ibm-base-ocp-vpc&version=X.X.X"
  ibmcloud_api_key     = "XXXXXXXXXXXXXXXXXXX"
  cluster_name         = "example-cluster-name"
  resource_group_id    = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
  region               = "us-south"
  force_delete_storage = true
  vpc_id               = "79cxxxx-xxxx-xxxx-xxxx-xxxxxXX8667"
  # obtain the below values from the targeted VPC and adjust to the number of zones, subnets, subnet name, cidr_block, id, zone
  vpc_subnets          = {
    zone-1    = [
        {
            cidr_block = "192.168.32.0/22"
            id         = "0717-afc29fbb-0dbe-493a-a5b9-f3c5899cb8b9"
            zone       = "us-south-1"
        },
        {
            cidr_block = "192.168.36.0/22"
            id         = "0727-d65c1eda-9e38-4200-8452-cb8ff5bb3140"
            zone       = "us-south-2"
        },
        {
            cidr_block = "192.168.40.0/22"
            id         = "0737-9a823cd3-16bf-4ba4-a429-9e1fc7db74b8"
            zone       = "us-south-3"
        }
    ]
    zone-2 = [
        {
            cidr_block = "192.168.0.0/22"
            id         = "0717-846b9490-34ae-4a6c-8288-28112dca1ba3"
            zone       = "us-south-1"
        },
        {
            cidr_block = "192.168.4.0/22"
            id         = "0727-ef8db7f6-ffa5-4d8b-a317-4631741a45ee"
            zone       = "us-south-2"
        },
        {
            cidr_block = "192.168.8.0/22"
            id         = "0737-c9a6d871-d95b-4914-abf5-82c22f4161d1"
            zone       = "us-south-3"
        }
    ]
    zone-3 = [
        {
            cidr_block = "192.168.16.0/22"
            id         = "0717-d46e227c-89d4-4b02-9008-d03907a275b6"
            zone       = "us-south-1"
        },
        {
            cidr_block = "192.168.20.0/22"
            id         = "0727-93b1edcb-966c-4517-a7af-6ac63cd93adf"
            zone       = "us-south-2"
        },
        {
            cidr_block = "192.168.24.0/22"
            id         = "0737-807ec4f1-4d84-484e-b2f4-62dd5e431065"
            zone       = "us-south-3"
        }
    ]
  }
}

Features and capabilities

Create a Red Hat OpenShift VPC cluster on IBM Cloud

Create a Red Hat OpenShift VPC cluster on IBM Cloud.

Autoscaling

Configure worker autoscaling.

Optionally create a Cloud Object Storage instance

Optionally create a Cloud Object Storage instance which is required by OCP VPC clusters. Also supports using existing instance.

Attach access tags

Attach access tags to the cluster resources.

Enable cluster managed add-ons

Enable any of the supported managed cluster addons.

Encrypt data with key management services

Supports key management encryption (BYOK and KYOK) for boot volumes and cluster data.

    Version last updated: 11/29/2023
    Example

      Details

      • Docs
      • Content source 

      Details

      Type
      • Terraform
      Provider
      • Community
      Category
      • Developer tools
      Last updated
      • 05/26/2025
      Product version
      • v3.11.2
      Example
      • Basic
      Copy
      Copy
      Copy
      Copy
      Copy
      Copy

      Current weekly downloads

      Count: 0

      Basic single zone example

      A simple example that shows how to provision a basic single zone OCP VPC cluster.

      The following resources are provisioned by this example:

      • A new resource group, if an existing one is not passed in.
      • A basic VPC and subnet with public gateway enabled
      • A single zone OCP VPC cluster

      Basic example

      Focus sentinel
      Close

      Basic example

      Focus sentinel

      A simple example that shows how to provision a basic single zone OCP VPC cluster.

      Follow these steps to download the code and configure it. Then, run the example on your local machine. Learn more.
      1. Download the source file for this example, and then extract the .tar.gz file.
      2. Change to the extracted
        Copy to clipboard
        directory.
      3. If any module in the example comes from a private catalog, run the
        Copy to clipboard
        CLI command as a user who has account access to the private catalog.
      4. Run the following Terraform commands in the same terminal instance.
        $ terraform init
        Copy to clipboard
        $ terraform plan
        Copy to clipboard
        $ terraform apply
        Copy to clipboard