Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ locals {
]
}

# Ensure to use addons versions supported by cluster version
# See ibmcloud ks cluster addon versions
locals {
ocp_version = "4.19"
vpc_file_csi_driver = "2.0"
openshift_data_foundation = "4.19.0"
}

module "ocp_base" {
source = "terraform-ibm-modules/base-ocp-vpc/ibm"
version = "3.78.7"
Expand All @@ -86,14 +94,14 @@ module "ocp_base" {
force_delete_storage = true
vpc_id = ibm_is_vpc.vpc.id
vpc_subnets = local.cluster_vpc_subnets
ocp_version = "4.19"
ocp_version = local.ocp_version
worker_pools = local.worker_pools
access_tags = var.access_tags
ocp_entitlement = var.ocp_entitlement
addons = {
"vpc-file-csi-driver" = { version = "2.0" }
"vpc-file-csi-driver" = { version = local.vpc_file_csi_driver }
"openshift-data-foundation" = {
version = "4.19.0"
version = local.openshift_data_foundation
parameters_json = <<PARAMETERS_JSON
{
"osdStorageClassName":"localblock",
Expand Down
13 changes: 9 additions & 4 deletions tests/resources/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ locals {
]
}

# Ensure to use addons versions supported by cluster version
# See ibmcloud ks cluster addon versions
locals {
cluster_name = "${var.prefix}-cluster"
ocp_version = "4.19"
vpc_file_csi_driver = "2.0"
openshift_data_foundation = "4.19.0"
cluster_name = "${var.prefix}-cluster"
}

module "ocp_base" {
Expand All @@ -89,14 +94,14 @@ module "ocp_base" {
cluster_name = local.cluster_name
force_delete_storage = true
vpc_id = ibm_is_vpc.vpc.id
ocp_version = "4.19"
ocp_version = local.ocp_version
vpc_subnets = local.cluster_vpc_subnets
worker_pools = local.worker_pools
access_tags = []
disable_outbound_traffic_protection = true # set as True to enable outbound traffic; required for accessing Operator Hub in the OpenShift console.
addons = {
openshift-data-foundation = {
version = "4.19.0"
version = local.openshift_data_foundation
parameters_json = <<PARAMETERS_JSON
{
"osdStorageClassName":"localblock",
Expand All @@ -106,7 +111,7 @@ module "ocp_base" {
PARAMETERS_JSON
}
vpc-file-csi-driver = {
version = "2.0"
version = local.vpc_file_csi_driver
}
}
}