Skip to content

OpenShift Virtualization enables you to run VM workloads alongside containerized apps within the fully managed Red Hat OpenShift on IBM Cloud offering.

License

Notifications You must be signed in to change notification settings

terraform-ibm-modules/terraform-ibm-ocp-virtualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform IBM OpenShift Virtualization module

Incubating (Not yet consumable) latest release pre-commit Renovate enabled semantic-release

This module configures Openshift Virtualization on an IBM Cloud Red Hat OpenShift Container Platform.

Overview

terraform-ibm-ocp-virtualization

Usage

# ############################################################################
# Init cluster config for helm
# ############################################################################

data "ibm_container_cluster_config" "cluster_config" {
  cluster_name_id = "xxxxxxxxx" # replace with cluster ID or name
}

# ############################################################################
# Config providers
# ############################################################################

provider "ibm" {
  ibmcloud_api_key = "xxxxxxxxxxxx"  # pragma: allowlist secret
}

provider "helm" {
  kubernetes {
    host                   = data.ibm_container_cluster_config.cluster_config.host
    token                  = data.ibm_container_cluster_config.cluster_config.token
    cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
  }
}

provider "kubernetes" {
  host                   = data.ibm_container_cluster_config.cluster_config.host
  token                  = data.ibm_container_cluster_config.cluster_config.token
  cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}

# ############################################################################
# Install Virtualization
# ############################################################################

module "virtualization" {
  source                        = "terraform-ibm-modules/ocp-virtualization/ibm"
  version                       = "X.Y.Z" # replace with actual version of module to consume
  cluster_id                    = "xxxxxxx" # replace with ID of the cluster
  cluster_resource_group_id     = "xxxxxxx" # replace with ID of the cluster resource group
}

Required access policies

Required IAM access policies

You need the following permissions to run this module.

  • Service
    • Resource group only
      • Viewer access on the specific resource group
    • Kubernetes service
      • Viewer platform access
      • Manager service access

Requirements

Name Version
terraform >= 1.9.0
helm >= 2.15.0, <3.0.0
ibm >= 1.79.1, <2.0.0
kubernetes >= 2.16.1, < 3.0.0
null >= 3.2.1, < 4.0.0
time >= 0.9.1, < 1.0.0

Modules

No modules.

Resources

Name Type
helm_release.operator resource
helm_release.subscription resource
kubernetes_config_map_v1_data.disable_default_storageclass resource
kubernetes_config_map_v1_data.set_vpc_file_default_storage_class resource
null_resource.config_map_status resource
null_resource.enable_catalog_source resource
null_resource.storageprofile_status resource
null_resource.update_storage_profile resource
time_sleep.wait_for_subscription resource
ibm_container_cluster_config.cluster_config data source
ibm_container_vpc_cluster.cluster data source

Inputs

Name Description Type Default Required
cluster_config_endpoint_type Specify the type of endpoint to use to access the cluster configuration. Possible values: default, private, vpe, link. The default value uses the default endpoint of the cluster. string "default" no
cluster_id The ID of the cluster to deploy the agents in. string n/a yes
cluster_resource_group_id The resource group ID of the cluster. string n/a yes
infra_node_selectors List of infra node selectors to apply to HyperConverged pods. Learn more.
list(object({
key = string
values = list(string)
}))
[
{
"key": "ibm-cloud.kubernetes.io/server-type",
"values": [
"virtual",
"physical"
]
}
]
no
vpc_file_default_storage_class The name of the VPC File storage class which will be set as the default storage class. string "ibmc-vpc-file-metro-1000-iops" no
wait_till To avoid long wait times when you run your Terraform code, you can specify the stage when you want Terraform to mark the cluster resource creation as completed. Depending on what stage you choose, the cluster creation might not be fully completed and continues to run in the background. However, your Terraform code can continue to run without waiting for the cluster to be fully created. Supported args are MasterNodeReady, OneWorkerNodeReady, IngressReady and Normal. string "Normal" no
wait_till_timeout Timeout for wait_till in minutes. number 90 no
workloads_node_selectors List of workload node selectors to apply to HyperConverged pods. Learn more.
list(object({
key = string
values = list(string)
}))
[
{
"key": "ibm-cloud.kubernetes.io/server-type",
"values": [
"physical"
]
}
]
no

Outputs

Name Description
cluster_crn CRN of the cluster.
cluster_id ID of the cluster.
cluster_name Name of the cluster.

Contributing

You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.

To set up your local development environment, see Local development setup in the project documentation.

About

OpenShift Virtualization enables you to run VM workloads alongside containerized apps within the fully managed Red Hat OpenShift on IBM Cloud offering.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •