Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
184d003
feat: ocp-quick-start-DA
Ak-sky Feb 6, 2025
95d3d0b
Merge branch 'main' into qs
Ak-sky Feb 6, 2025
5731815
test
Ak-sky Feb 6, 2025
f69464e
test
Ak-sky Feb 6, 2025
6c39d3d
Merge remote-tracking branch 'origin/main' into qs
Ak-sky Feb 9, 2025
74ed109
ocp quickstart
Ak-sky Feb 9, 2025
50b6263
pr-test fixes
Ak-sky Feb 9, 2025
59139d9
Merge branch 'main' into qs
Ak-sky Feb 10, 2025
4a1d166
minor fixes
Ak-sky Feb 10, 2025
9c8db31
pr-test fixes
Ak-sky Feb 10, 2025
82f8483
pr-test fixes
Ak-sky Feb 10, 2025
f0f4de7
Merge branch 'main' into qs
Ak-sky Feb 13, 2025
a8fb21f
addressed review comments
Ak-sky Feb 17, 2025
f65fea9
addressed review comments
Ak-sky Feb 17, 2025
02df281
Merge branch 'main' into qs
Ak-sky Feb 19, 2025
2471b8d
Merge branch 'main' into qs
Ak-sky Feb 21, 2025
5e4781d
updated the name to baseline
Ak-sky Feb 21, 2025
2dcde4e
SKIP UPGRADE TEST
Ak-sky Feb 21, 2025
fa91b4d
updated baseline with features
Ak-sky Feb 21, 2025
0000af3
Merge branch 'main' into qs
Ak-sky Feb 22, 2025
b8fc1b7
testing, few-to-dos
Ak-sky Feb 22, 2025
d845562
Merge branch 'main' into qs
Ak-sky Feb 24, 2025
f2305ba
test fixes
Ak-sky Feb 24, 2025
e9a2dfa
test fixes
Ak-sky Feb 25, 2025
2d8f55a
test fixes
Ak-sky Feb 25, 2025
0b06155
Merge branch 'main' into qs
Ak-sky Feb 25, 2025
6dca7bb
Merge branch 'main' into qs
Ak-sky Feb 25, 2025
5091f2d
update ibm_catalog.json
Feb 26, 2025
88fc875
fix: remove the need for a manual step on destroy through use of `orp…
Aashiq-J Feb 26, 2025
4944775
chore(deps): update ci dependencies (#607)
terraform-ibm-modules-ops Mar 1, 2025
9e6dbe0
chore(deps): update ci dependencies (#608)
terraform-ibm-modules-ops Mar 3, 2025
ac4220a
fix(deps): update terraform-module (#606)
terraform-ibm-modules-ops Mar 3, 2025
3ac37c1
Merge remote-tracking branch 'origin/main' into qs
Ak-sky Mar 4, 2025
fc9cfa1
Update solutions/baseline/variables.tf
Ak-sky Mar 4, 2025
cc4809e
update label name
Mar 5, 2025
f772960
Merge branch 'qs' of https://github.com/terraform-ibm-modules/terrafo…
Mar 5, 2025
57c8903
Merge branch 'main' into qs
Ak-sky Mar 6, 2025
056fe06
addressed review comments
Ak-sky Mar 6, 2025
9c95739
order of variables in ibm catalog json
Ak-sky Mar 6, 2025
5c0afd9
prereq scrips added for catalog validation
Ak-sky Mar 6, 2025
f91292c
prereq scrips added for catalog validation
Ak-sky Mar 6, 2025
7ecccaf
Merge branch 'main' into qs
Ak-sky Mar 10, 2025
f2fd103
added KMS
Ak-sky Mar 10, 2025
e7b64ee
added KMS
Ak-sky Mar 10, 2025
f2e88b9
update catalog
Mar 10, 2025
209002b
Merge branch 'qs' of https://github.com/terraform-ibm-modules/terrafo…
Mar 10, 2025
587cd7f
update catalog.json
Mar 10, 2025
9e3029e
update catalog and add output
Mar 10, 2025
4d7f529
added KMS
Ak-sky Mar 10, 2025
e4003c8
minor fixes
Ak-sky Mar 11, 2025
618bd8f
minor fixes
Ak-sky Mar 11, 2025
74465e0
update catalog
Mar 11, 2025
607f28b
update catalog.json
Mar 11, 2025
b097238
minor fixes
Ak-sky Mar 11, 2025
832c975
updated DA docs
Ak-sky Mar 11, 2025
8248910
updated DA docs
Ak-sky Mar 11, 2025
51e6260
updated DA docs
Ak-sky Mar 11, 2025
6b178cb
updated DA docs
Ak-sky Mar 11, 2025
101bb6f
updated DA docs
Ak-sky Mar 11, 2025
80fb314
updated DA docs
Ak-sky Mar 11, 2025
2376446
update COS dependency
Mar 12, 2025
41cf3ab
Merge branch 'qs' of https://github.com/terraform-ibm-modules/terrafo…
Mar 12, 2025
31ae6d1
updated DA docs URL to variable file
Ak-sky Mar 12, 2025
fa0ebd1
update catalog
Mar 12, 2025
62eebd1
Merge branch 'qs' of https://github.com/terraform-ibm-modules/terrafo…
Mar 12, 2025
3a49f58
update catalog and offering id
Mar 12, 2025
eae6506
resolve pipeline issue
Mar 13, 2025
2ae5972
Merge branch 'main' into qs
iamar7 Mar 17, 2025
d3edc72
update pr_test
Mar 17, 2025
a6cdac9
update test
Mar 18, 2025
80e6e6e
update catalog
Mar 18, 2025
a74d6c7
update catalog
Mar 18, 2025
d116dfb
updata ibm_catalog
Mar 18, 2025
0ed779d
resolve pc
Mar 18, 2025
51e799a
resolve comments
Mar 20, 2025
cd902db
remove observability agents dependency
Mar 21, 2025
82d60b0
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
Aashiq-J Mar 21, 2025
a823f1b
fix ocp da
Aashiq-J Mar 21, 2025
bd7abf0
bug fixes
Aashiq-J Mar 22, 2025
e82f06c
Merge branch 'main' into qs
Aashiq-J Mar 23, 2025
9502b3a
Merge branch 'main' into qs
iamar7 Mar 24, 2025
e212d05
update variable descriptions
Mar 24, 2025
30b3bfc
Merge branch 'qs' of https://github.com/terraform-ibm-modules/terrafo…
Mar 24, 2025
c7a1f5e
update DA docs
Mar 25, 2025
d05e788
Update ibm_catalog.json
vkuma17 Mar 25, 2025
40ac6e3
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
Aashiq-J Mar 25, 2025
c49f623
The default behavior is to deploy the worker pool across all subnets …
Aashiq-J Mar 25, 2025
ff93b6e
Update ibm_catalog.json
vkuma17 Mar 25, 2025
e9b38bb
change default behaviour for worker_pools
Aashiq-J Mar 26, 2025
5cd436c
update dependency mapping and variable description
Mar 26, 2025
bb7671a
update variable grouping
Mar 26, 2025
34bafac
update worker_pool to additional_worker_pool
Mar 26, 2025
73168a1
Update deployable-architecture-ocp-cluster-qs.svg
iamar7 Mar 27, 2025
222e00e
update DA docs and resolve comment
Mar 27, 2025
cae645b
update DA-docs
Mar 27, 2025
1f121f7
update tags
Mar 27, 2025
2e90b7d
Update deployable-architecture-ocp-cluster-qs.svg
iamar7 Mar 27, 2025
afe5924
update variable.tf
Mar 27, 2025
b3225bb
resolve comments
Mar 27, 2025
e7dd8cf
changes
Aashiq-J Mar 27, 2025
d01de79
Update ibm_catalog.json
Khuzaima05 Mar 27, 2025
d9d2717
Update ibm_catalog.json
Khuzaima05 Mar 27, 2025
27f8ff8
remove region mapping
Mar 27, 2025
b54d031
update offering icon
Mar 28, 2025
28b334c
skipping all other test for testing fully configurable DA
Mar 28, 2025
db97da9
move full configurable test to schematics
Mar 28, 2025
b4e3ee1
resolve comments
Mar 28, 2025
4750d42
resolve comments
Mar 28, 2025
6cb5cf4
shifting upgrade test to schematics
Mar 28, 2025
8bf6011
update catalog id and product id
Mar 28, 2025
7bfee87
Merge branch 'main' into qs
imprateeksh Mar 29, 2025
5802a57
added support for ocp ai addon
imprateeksh Mar 29, 2025
5bfa62c
Merge branch 'main' into qs
imprateeksh Mar 29, 2025
2fbbfea
Merge branch 'main' into qs
imprateeksh Mar 31, 2025
c8543d1
Merge branch 'main' into qs
imprateeksh Mar 31, 2025
9844906
fix: resolve review comments
imprateeksh Mar 31, 2025
a5eeafe
fix: added crn_parser for account id retrieval
imprateeksh Mar 31, 2025
a4b46c1
fix: review comments, moved test to other_test, remoed force_delete_s…
imprateeksh Mar 31, 2025
6edf3a8
resolve review comments
Apr 1, 2025
96bd931
refactor: refactored tests
imprateeksh Apr 1, 2025
c652b61
Merge branch 'qs' of github.com:terraform-ibm-modules/terraform-ibm-b…
imprateeksh Apr 1, 2025
1229b78
fix: reverted force_delete_storage, removed SCC references, removed a…
imprateeksh Apr 1, 2025
439a313
test: enabled kms_encryption, updated catalogValidation file
imprateeksh Apr 1, 2025
e9c9577
fix: updates to da_docs and catalogValidation file
imprateeksh Apr 1, 2025
83bad4a
fix: updated detect secrets
imprateeksh Apr 1, 2025
362fa31
fix: reverted changes
imprateeksh Apr 1, 2025
e77828a
fix: updated icon and offering_id
imprateeksh Apr 1, 2025
cc591f9
fix: updated catalog pre-commit info
imprateeksh Apr 1, 2025
0ed0b29
fix: updated pre-validation deploy script
imprateeksh Apr 1, 2025
86857fe
fix: updated pre-validation deploy script
imprateeksh Apr 1, 2025
b12e809
fix: updated pre-validation deploy script
imprateeksh Apr 1, 2025
c2ee9a2
Update .catalog-onboard-pipeline.yaml
ocofaigh Apr 1, 2025
3430d36
fix: another round of script review correction
imprateeksh Apr 1, 2025
5b83c70
fix: another round of script review correction
imprateeksh Apr 1, 2025
2b85947
Removed wait time as 60 minutes is less for ocp cluster. Default is 1…
vkuma17 Apr 2, 2025
3801ed5
fixed pre-commit
Apr 2, 2025
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
20 changes: 7 additions & 13 deletions .catalog-onboard-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
apiVersion: v1
offerings:
- name: terraform-ibm-base-ocp-vpc
kind: module
kind: solution
catalog_id: 7df1e4ca-d54c-4fd0-82ce-3d13247308cd
offering_id: 8531b562-91d5-4974-a195-5dff72ef2a5d
examples:
- name: basic
mark_ready: true
- name: advanced
mark_ready: true
- name: fscloud
mark_ready: true
- name: multiple_mzr_clusters
mark_ready: true
- name: add_rules_to_sg
mark_ready: true
- name: cross_kms_support
variations:
- name: quickstart-vpc
mark_ready: true
install_type: fullstack
scc:
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
region: us-south
15 changes: 2 additions & 13 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-07-12T12:56:42Z",
"generated_at": "2025-02-09T12:58:26Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -76,18 +76,7 @@
"name": "TwilioKeyDetector"
}
],
"results": {
"ibm_catalog.json": [
{
"hashed_secret": "a03815a5700107eb9f0d1a9608d2fcbdc48b7f5d",
"is_secret": false,
"is_verified": false,
"line_number": 20,
"type": "Secret Keyword",
"verified_result": null
}
]
},
"results": {},
"version": "0.13.1+ibm.62.dss",
"word_list": {
"file": null,
Expand Down
226 changes: 106 additions & 120 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,138 +17,124 @@
"cluster"
],
"short_description": "Provisions a Red Hat OpenShift VPC cluster on IBM Cloud",
"long_description": "Use this module to provision an [IBM Cloud Red Hat OpenShift cluster](https:\/\/cloud.ibm.com\/docs\/openshift?topic=openshift-getting-started) 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.\r\n\r\n### Before you begin\r\n\r\n- Make sure that you have a recent version of the [IBM Cloud CLI](https:\/\/cloud.ibm.com\/docs\/cli?topic=cli-getting-started)\r\n- Make sure that you have a recent version of the [IBM Cloud Kubernetes service CLI](https:\/\/cloud.ibm.com\/docs\/containers?topic=containers-kubernetes-service-cli)\r\n\r\n### Usage\r\n```hcl\r\nmodule \"ocp_base\" {\r\n # Replace \"X.X.X\" with a release version to lock into a specific release\r\n 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\"\r\n ibmcloud_api_key = \"XXXXXXXXXXXXXXXXXXX\"\r\n cluster_name = \"example-cluster-name\"\r\n resource_group_id = \"xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX\"\r\n region = \"us-south\"\r\n force_delete_storage = true\r\n vpc_id = \"79cxxxx-xxxx-xxxx-xxxx-xxxxxXX8667\"\r\n # obtain the below values from the targeted VPC and adjust to the number of zones, subnets, subnet name, cidr_block, id, zone\r\n vpc_subnets = {\r\n zone-1 = [\r\n {\r\n cidr_block = \"192.168.32.0\/22\"\r\n id = \"0717-afc29fbb-0dbe-493a-a5b9-f3c5899cb8b9\"\r\n zone = \"us-south-1\"\r\n },\r\n {\r\n cidr_block = \"192.168.36.0\/22\"\r\n id = \"0727-d65c1eda-9e38-4200-8452-cb8ff5bb3140\"\r\n zone = \"us-south-2\"\r\n },\r\n {\r\n cidr_block = \"192.168.40.0\/22\"\r\n id = \"0737-9a823cd3-16bf-4ba4-a429-9e1fc7db74b8\"\r\n zone = \"us-south-3\"\r\n }\r\n ]\r\n zone-2 = [\r\n {\r\n cidr_block = \"192.168.0.0\/22\"\r\n id = \"0717-846b9490-34ae-4a6c-8288-28112dca1ba3\"\r\n zone = \"us-south-1\"\r\n },\r\n {\r\n cidr_block = \"192.168.4.0\/22\"\r\n id = \"0727-ef8db7f6-ffa5-4d8b-a317-4631741a45ee\"\r\n zone = \"us-south-2\"\r\n },\r\n {\r\n cidr_block = \"192.168.8.0\/22\"\r\n id = \"0737-c9a6d871-d95b-4914-abf5-82c22f4161d1\"\r\n zone = \"us-south-3\"\r\n }\r\n ]\r\n zone-3 = [\r\n {\r\n cidr_block = \"192.168.16.0\/22\"\r\n id = \"0717-d46e227c-89d4-4b02-9008-d03907a275b6\"\r\n zone = \"us-south-1\"\r\n },\r\n {\r\n cidr_block = \"192.168.20.0\/22\"\r\n id = \"0727-93b1edcb-966c-4517-a7af-6ac63cd93adf\"\r\n zone = \"us-south-2\"\r\n },\r\n {\r\n cidr_block = \"192.168.24.0\/22\"\r\n id = \"0737-807ec4f1-4d84-484e-b2f4-62dd5e431065\"\r\n zone = \"us-south-3\"\r\n }\r\n ]\r\n }\r\n}\r\n```",
"long_description": "This architecture supports creation and configuration of IBM Cloud Red Hat OpenShift cluster.",
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/README.md",
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/RH_OpenShift.svg",
"provider_name": "IBM",
"features": [
{
"title": "Create a Red Hat OpenShift VPC cluster on IBM Cloud",
"description": "Create a Red Hat OpenShift VPC cluster on IBM Cloud."
},
{
"title": "Autoscaling",
"description": "Configure worker autoscaling."
},
{
"title": "Optionally create a Cloud Object Storage instance",
"description": "Optionally create a Cloud Object Storage instance which is required by OCP VPC clusters. Also supports using existing instance."
},
{
"title": "Attach access tags",
"description": "Attach access tags to the cluster resources."
},
{
"title": "Enable cluster managed add-ons",
"description": "Enable any of the supported [managed cluster addons](https://cloud.ibm.com/docs/containers?topic=containers-managed-addons)."
},
{
"title": "Encrypt data with key management services",
"description": "Supports key management encryption (BYOK and KYOK) for boot volumes and cluster data."
}
],
"flavors": [
{
"label": "Basic",
"name": "basic",
"working_directory": "examples/basic",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "Basic example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "A simple example that shows how to provision a basic single zone OCP VPC cluster."
}
]
}
},
{
"label": "Advanced",
"name": "advanced",
"working_directory": "examples/advanced",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "Advanced example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "An advanced example which shows how to create a multi-zone KMS encrypted OCP VPC cluster with custom worker node taints."
}
]
}
},
{
"label": "Financial Services compliant",
"name": "fscloud",
"working_directory": "examples/fscloud",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "Financial Services compliant example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "This example uses the Profile for IBM Cloud Framework for Financial Services to provision an instance of the base OCP VPC module in a compliant manner."
}
]
}
},
{
"label": "2 MZR clusters in same VPC",
"name": "multiple_mzr_clusters",
"working_directory": "examples/multiple_mzr_clusters",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "2 MZR clusters in same VPC example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "This is an example of creating 2 MZR clusters in same VPC, and deploying the observability agents in the clusters."
}
]
}
},
{
"label": "Cluster security group rules",
"name": "add_rules_to_sg",
"working_directory": "examples/add_rules_to_sg",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "Cluster security group rules example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "This example will add security rules to the `kube-<vpcid>` and `kube-<clusterId>` security groups."
}
]
}
},
{
"label": "Cross account KMS encryption",
"name": "cross_kms_support",
"working_directory": "examples/cross_kms_support",
"architecture": {
"diagrams": [
{
"diagram": {
"caption": "Cross account KMS encryption example",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/documentation/main/icons/ModuleExampleDiagram.svg",
"type": "image/svg+xml"
},
"description": "A single zone OCP VPC cluster configured with KMS encryption for cluster data and worker block storage using a KMS encryption key from another account."
}
]
"label": "quickstart",
"name": "quickstart",
"install_type": "fullstack",
"working_directory": "solutions/quickstart-vpc",
"configuration": [
{
"key": "ibmcloud_api_key"
},
{
"key": "prefix",
"required": true
},
{
"key": "use_existing_resource_group"
},
{
"key": "resource_group_name"
},
{
"key": "cluster_name"
},
{
"key": "ocp_version"
},
{
"key": "number_worker_nodes"
},
{
"key": "machine_type"
},
{
"key": "vpc_id"
},
{
"key": "existing_cos_id"
},
{
"key": "region",
"required": true,
"options": [
{
"displayname": "Dallas (us-south)",
"value": "us-south"
},
{
"displayname": "Frankfurt (eu-de)",
"value": "eu-de"
},
{
"displayname": "London (eu-gb)",
"value": "eu-gb"
},
{
"displayname": "Madrid (eu-es)",
"value": "eu-es"
},
{
"displayname": "Osaka (jp-osa)",
"value": "jp-osa"
},
{
"displayname": "Sydney (au-syd)",
"value": "au-syd"
},
{
"displayname": "Tokyo (jp-tok)",
"value": "jp-tok"
},
{
"displayname": "Osaka (jp-osa)",
"value": "jp-osa"
},
{
"displayname": "Sao Paulo (br-sao)",
"value": "br-sao"
},
{
"displayname": "Toronto (ca-tor)",
"value": "ca-tor"
},
{
"displayname": "Washington (us-east)",
"value": "us-east"
}
]
}
],
"architecture": {
"descriptions": "This architecture creates a basic single zone OCP VPC cluster.",
"features": [
{
"title": "Creates an OCP VPC cluster",
"description": "Creates an OCP VPC cluster"
}
],
"diagrams": [
{
"diagram": {
"caption": "Red Hat OpenShift VPC cluster for IBM Cloud.",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/main/reference-architecture/deployable-architecture-ocp-cluster-qs.svg",
"type": "image/svg+xml"
},
"description": "This architecture creates a basic single zone OCP VPC cluster."
}
]
}
}
]
}
Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions solutions/quickstart-vpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Single zone OCP VPC cluster (Quickstart)

This architecture creates a basic single zone OCP VPC cluster. Also the outbound traffic is allowed, which is required for accessing the Operator Hub.

The following resources are provisioned by this example:

- A new resource group, if an existing one is not passed in.
- A single zone OCP VPC cluster.


![single-zone-ocp-cluster](../../reference-architecture/deployable-architecture-ocp-cluster-qs.svg)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ibmcloud_api_key": $VALIDATION_APIKEY,
"region": "au-syd",
"resource_tags": $TAGS,
"prefix": $PREFIX
}
61 changes: 61 additions & 0 deletions solutions/quickstart-vpc/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#######################################################################################################################
# Resource Group
#######################################################################################################################
module "resource_group" {
source = "terraform-ibm-modules/resource-group/ibm"
version = "1.1.6"
resource_group_name = var.use_existing_resource_group == false ? ((var.prefix != null && var.prefix != "") ? "${var.prefix}-${var.resource_group_name}" : var.resource_group_name) : null
existing_resource_group_name = var.use_existing_resource_group == true ? var.resource_group_name : null
}

########################################################################################################################
# OCP VPC cluster (single zone)
########################################################################################################################

locals {
prefix = var.prefix != null ? (var.prefix != "" ? var.prefix : null) : null
}

data "ibm_is_subnets" "vpc_subnets" {
vpc = var.vpc_id
}

locals {
cluster_vpc_subnets = {
for subnet in data.ibm_is_subnets.vpc_subnets.subnets :
"default" => [{
id = subnet.id
zone = subnet.zone
cidr_block = subnet.ipv4_cidr_block
}]
}

worker_pools = [
{
subnet_prefix = "default"
pool_name = "default"
machine_type = var.machine_type
workers_per_zone = var.number_worker_nodes
operating_system = var.operating_system
}
]
}

module "ocp_base" {
source = "../.."
resource_group_id = module.resource_group.resource_group_id
region = var.region
tags = var.resource_tags
cluster_name = try("${local.prefix}-${var.cluster_name}", var.cluster_name)
force_delete_storage = true
use_existing_cos = true
existing_cos_id = var.existing_cos_id
vpc_id = var.vpc_id
vpc_subnets = local.cluster_vpc_subnets
ocp_version = var.ocp_version
worker_pools = local.worker_pools
access_tags = var.access_tags
ocp_entitlement = var.ocp_entitlement
disable_outbound_traffic_protection = true
import_default_worker_pool_on_create = false
}
8 changes: 8 additions & 0 deletions solutions/quickstart-vpc/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
########################################################################################################################
# Outputs
########################################################################################################################

output "cluster_name" {
value = module.ocp_base.cluster_name
description = "The name of the provisioned cluster."
}
Loading