This module configures Openshift Virtualization on an IBM Cloud Red Hat OpenShift Container Platform.
# ############################################################################
# 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
}
You need the following permissions to run this module.
- Service
- Resource group only
Viewer
access on the specific resource group
- Kubernetes service
Viewer
platform accessManager
service access
- Resource group only
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 |
No modules.
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 |
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({ |
[ |
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({ |
[ |
no |
Name | Description |
---|---|
cluster_crn | CRN of the cluster. |
cluster_id | ID of the cluster. |
cluster_name | Name of the cluster. |
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.