diff --git a/ibm_catalog.json b/ibm_catalog.json index 395c5a0d..3861d0ab 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -2,15 +2,14 @@ "products": [ { "name": "deploy-arch-ibm-ocp-vpc", - "label": "[Add-ons Beta] Cloud automation for Red Hat OpenShift Container Platform on VPC", + "label": "Cloud automation for Red Hat OpenShift Container Platform on VPC", "product_kind": "solution", "tags": [ "containers", "target_terraform", "terraform", "solution", - "ibm_created", - "ibm_beta" + "ibm_created" ], "keywords": [ "terraform", @@ -18,30 +17,51 @@ "cluster", "red_hat_openshift" ], - "short_description": "Automates Red Hat OpenShift VPC cluster deployment on IBM Cloud, offering full configurability and flexibility for diverse workloads.", - "long_description": "This deployable architecture deploys a Red Hat OpenShift cluster on IBM Cloud. This is an experimental tile and not suitable for production workloads. Stay here if you want to try an experimental version with the [Optional and swappable components](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-choose-plan-process#optional-swappable) capability.", + "short_description": "Automates the deployment of Red Hat OpenShift container platform on IBM Cloud with optional integration of security and logging services.", + "long_description": "The Cloud automation for Red Hat OpenShift Container Platform on VPC deploys a Red Hat OpenShift cluster on a Virtual Private Cloud (VPC). It also facilitates the seamless integration with other security and observability services, enabling a scalable and flexible cloud environment for containerized applications. This architecture serve as a foundational deployable architecture for other architectures like [Cloud automation for Red Hat OpenShift AI](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-ocp-ai-ba708aed-bb8a-4ac0-83a7-53a066701db5-global) to deploy mission critical applications and AI-driven initiatives to market quickly and securely with a managed OpenShift service.\n\nℹ️ This Terraform-based automation is part of a broader suite of IBM-maintained Infrastructure as Code (IaC) assets, each following the naming pattern \"Cloud automation for *servicename*\" and focusing on single IBM Cloud service. These single-service deployable architectures can be used on their own to streamline and automate service deployments through an [IaC approach](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understanding-projects), or assembled together into a broader [automated IaC stack](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-config-stack) to automate the deployment of an end-to-end solution architecture.", "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/terraform-ibm-base-ocp-vpc/main/images/ocp_icon.svg", "provider_name": "IBM", "features": [ { - "title": "OCP on IBM Cloud", - "description": "Create and configures a Red Hat OpenShift VPC cluster on IBM Cloud." + "title": "Red Hat OpenShift Cluster", + "description": "Creates a [Red Hat OpenShift Cluster](https://cloud.ibm.com/docs/openshift) on IBM Cloud that helps businesses manage their containerized applications at scale with added enterprise features such as security, scalability, and automation." }, { - "title": "Object Storage bucket for OpenShift internal registry storage.", - "description": "Creates and configures an Object Storage bucket required for OpenShift internal registry storage." + "title": "Worker pools", + "description": "Configures worker pools in cluster through which you can group and manage [worker nodes](https://cloud.ibm.com/docs/openshift?topic=openshift-add-workers-vpc) of similar configurations, such as compute resources and availability zones." }, { - "title": "KMS encryption", - "description": "Supports creating a new key, or using an existing one to encrypt the COS bucket." + "title": "Access Endpoints", + "description": "Offers support for [private and public endpoints](https://cloud.ibm.com/docs/openshift?topic=openshift-access_cluster) to connect to the cluster. If the cluster is accessed only by applications running on IBM Cloud, the private endpoint can be enabled for enhanced security." + }, + { + "title": "Ingress Controller", + "description": "Sets up the [ingress controller](https://cloud.ibm.com/docs/openshift?topic=openshift-ingress-configure) for the cluster, responsible for routing external traffic to the appropriate services within the cluster." + }, + { + "title": "Object Storage", + "description": "Creates and configures an [Object Storage bucket](https://cloud.ibm.com/docs/openshift?topic=openshift-storage-cos-understand) which acts as OpenShift internal registry storage. You can provide an existing COS Instance or use the [Cloud automation for Object Storage](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-cos-68921490-2778-4930-ac6d-bae7be6cd958-global) for creating a new instance." + }, + { + "title": "KMS Encryption", + "description": "Optionally you can enable key management services(KMS) [encryption](https://cloud.ibm.com/docs/openshift?topic=openshift-encryption-secrets) of the Kubernetes Secrets and Object Storage bucket using either a newly created key or an existing one." + }, + { + "title": "Secrets Manager", + "description": "Optional integration with [Cloud automation for Secrets Manager](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-secrets-manager-6d6ebc76-7bbd-42f5-8bc7-78f4fabd5944-global) for centrally managing Ingress subdomain certificates." + }, + { + "title": "Observability", + "description": "This solution can leverage [Cloud automation for Observability](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-observability-a3137d28-79e0-479d-8a24-758ebd5a0eab-global) that supports configuring resources for logging, monitoring and activity tracker event routing (optional)." } ], - "support_details": "This product is in the community registry, as such support is handled through the originated repo. If you experience issues please open an issue in that repository [https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/issues](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/issues). Please note this product is not supported via the IBM Cloud Support Center.", + "support_details": "This product is in the community registry, as such support is handled through the originated repo. If you experience issues, please open an issue in the repository [here](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/issues). Please note this product is not supported via the IBM Cloud Support Center.", "flavors": [ { "label": "Fully configurable", "name": "fully-configurable", + "index": 1, "install_type": "fullstack", "working_directory": "solutions/fully-configurable", "compliance": { @@ -55,57 +75,105 @@ }, "iam_permissions": [ { + "service_name": "containers-kubernetes", + "role_crns": [ + "crn:v1:bluemix:public:iam::::serviceRole:Manager", + "crn:v1:bluemix:public:iam::::role:Editor" + ], + "notes": "Required to create and edit OpenShift cluster and the related resources." + }, + { + "service_name": "iam-identity", "role_crns": [ "crn:v1:bluemix:public:iam::::role:Administrator", "crn:v1:bluemix:public:iam-identity::::serviceRole:UserApiKeyCreator" ], - "service_name": "iam-identity", - "notes": "Allows IBM Cloud OpenShift to create the containers-kubernetes-key required by the service" + "notes": "Required to create the containers-kubernetes-key needed by the OpenShift cluster on IBM Cloud." + }, + { + "service_name": "is.vpc", + "role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"], + "notes": "Required for creating Virtual Private Cloud(VPC)." }, { + "service_name": "cloud-object-storage", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" ], - "service_name": "hs-crypto" + "notes": "Required to create Cloud Object Storage (COS) Instance." }, { + "service_name": "hs-crypto", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" ], - "service_name": "kms" + "notes": "[Optional] Required if KMS encryption is enabled and IBM Hyper Protect Crypto Services is used to encrypt the Kubernetes Secrets and Object Storage bucket." }, { + "service_name": "kms", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" ], - "service_name": "cloud-object-storage" + "notes": "[Optional] Required if KMS encryption is enabled and Key protect is used for encryption of Kubernetes Secrets and Object Storage bucket." }, { - "service_name": "containers-kubernetes", + "service_name": "sysdig-monitor", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" - ] + ], + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Cloud monitoring." + }, + { + "service_name": "logs", + "role_crns": [ + "crn:v1:bluemix:public:iam::::serviceRole:Manager", + "crn:v1:bluemix:public:iam::::role:Editor" + ], + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Cloud logs." + }, + { + "service_name": "logs-router", + "role_crns": [ + "crn:v1:bluemix:public:iam::::serviceRole:Manager" + ], + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Logs Routing." + }, + { + "service_name": "atracker", + "role_crns": [ + "crn:v1:bluemix:public:iam::::serviceRole:Writer", + "crn:v1:bluemix:public:iam::::role:Editor" + ], + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Activity Tracker Event Routing." + }, + { + "service_name": "secrets-manager", + "role_crns": [ + "crn:v1:bluemix:public:iam::::role:Administrator", + "crn:v1:bluemix:public:iam::::serviceRole:Manager" + ], + "notes": "[Optional] Required for creating an Secrets Manager instance. 'Manager' access required to create new secret groups." } ], "architecture": { "features": [ { - "title": "Creates a Red Hat OpenShift VPC cluster.", - "description": "Creates a Red Hat OpenShift VPC cluster." + "title": " ", + "description": "Configured to use IBM secure by default standards, but can be edited to fit your use case." } ], "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.svg", + "caption": "Red Hat OpenShift cluster topology", + "url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/refs/heads/main/reference-architecture/deployable-architecture-ocp-cluster.svg", "type": "image/svg+xml" }, - "description": "This architecture creates a fully-configurable Red Hat OpenShift VPC cluster." + "description": "This architecture supports creation of Red Hat OpenShift cluster within a Virtual Private Cloud (VPC).

You can create a fully-configured VPC by selecting the [Cloud automation for VPC](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-vpc-2af61763-f8ef-4527-a815-b92166f29bc8-global) dependency or you can use an existing VPC if any. The VPC can be provisioned either in a single-zone or multi-zone configuration, depending on your availability requirements. By default, the VPC addon provisions a three-zone VPC, forming the foundation for your OpenShift cluster. This cluster includes a single worker pool distributed across all three zones, with two worker nodes per zone. If you need additional worker pools, you can easily configure them using the additional_worker_pools variable.

A Cloud Object Storage (COS) instance is required for this topology. Within this instance, an Object Storage bucket will be created, which serves as the internal registry storage for the OpenShift cluster. The [Cloud automation for Object Storage](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-cos-68921490-2778-4930-ac6d-bae7be6cd958-global) architecture supports the creation of COS instance. Additionally, the storage bucket can be encrypted using Key Management Services(KMS) to enhance security.

For logging and monitoring needs, you can enable Observability for your cluster. [Cloud automation for Observability](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-observability-a3137d28-79e0-479d-8a24-758ebd5a0eab-global) provides advanced monitoring, logging, and operational insights into the performance and health of your deployment.

Secrets Manager Integration can also be enabled using [Cloud automation for Secrets Manager](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/dep[…]bm-secrets-manager-6d6ebc76-7bbd-42f5-8bc7-78f4fabd5944-global) for centrally managing Ingress subdomain certificates, ensuring secure management of sensitive credentials.

This architecture provides a robust and secure foundation for deploying and managing your Red Hat OpenShift cluster, enabling seamless integration, enhanced security, and comprehensive monitoring for your cloud-native applications." } ] }, @@ -117,26 +185,6 @@ "key": "prefix", "required": true }, - { - "key": "existing_resource_group_name", - "required": true, - "custom_config": { - "type": "resource_group", - "grouping": "deployment", - "original_grouping": "deployment", - "config_constraints": { - "identifier": "rg_name" - } - } - }, - { - "key": "existing_vpc_crn", - "required": true - }, - { - "key": "existing_cos_instance_crn", - "required": true - }, { "key": "cluster_name", "required": true @@ -146,26 +194,202 @@ "required": true, "options": [ { - "displayname": "4.14", - "value": "4.14" - }, - { - "displayname": "4.15", - "value": "4.15" + "displayname": "4.17", + "value": "4.17" }, { "displayname": "4.16", "value": "4.16" }, { - "displayname": "4.17", - "value": "4.17" + "displayname": "4.15", + "value": "4.15" + }, + { + "displayname": "4.14", + "value": "4.14" } ] }, { "key": "default_worker_pool_machine_type", - "required": true + "required": true, + "options": [ + { + "displayname": "bx2.16x64", + "value": "bx2.16x64" + }, + { + "displayname": "bx2.32x128", + "value": "bx2.32x128" + }, + { + "displayname": "bx2.48x192", + "value": "bx2.48x192" + }, + { + "displayname": "bx2.8x32", + "value": "bx2.8x32" + }, + { + "displayname": "bx3d.128x640", + "value": "bx3d.128x640" + }, + { + "displayname": "bx3d.16x80", + "value": "bx3d.16x80" + }, + { + "displayname": "bx3d.24x120", + "value": "bx3d.24x120" + }, + { + "displayname": "bx3d.32x160", + "value": "bx3d.32x160" + }, + { + "displayname": "bx3d.48x240", + "value": "bx3d.48x240" + }, + { + "displayname": "bx3d.64x320", + "value": "bx3d.64x320" + }, + { + "displayname": "bx3d.8x40", + "value": "bx3d.8x40" + }, + { + "displayname": "bx3d.96x480", + "value": "bx3d.96x480" + }, + { + "displayname": "cx2.16x32", + "value": "cx2.16x32" + },{ + "displayname": "cx2.32x64", + "value": "cx2.32x64" + }, + { + "displayname": "cx2.48x96", + "value": "cx2.48x96" + }, + { + "displayname": "cx3d.128x320", + "value": "cx3d.128x320" + }, + { + "displayname": "cx3d.16x40", + "value": "cx3d.16x40" + }, + { + "displayname": "cx3d.24x60", + "value": "cx3d.24x60" + }, + { + "displayname": "cx3d.32x80", + "value": "cx3d.32x80" + }, + { + "displayname": "cx3d.48x120", + "value": "cx3d.48x120" + }, + { + "displayname": "cx3d.64x160", + "value": "cx3d.64x160" + }, + { + "displayname": "cx3d.96x240", + "value": "cx3d.96x240" + }, + { + "displayname": "mx2.128x1024", + "value": "mx2.128x1024" + }, + { + "displayname": "mx2.16x128", + "value": "mx2.16x128" + }, + { + "displayname": "mx2.32x256", + "value": "mx2.32x256" + }, + { + "displayname": "mx2.48x384", + "value": "mx2.48x384" + }, + { + "displayname": "mx2.64x512", + "value": "mx2.64x512" + }, + { + "displayname": "mx2.8x64", + "value": "mx2.8x64" + }, + { + "displayname": "mx3d.128x1280", + "value": "mx3d.128x1280" + }, + { + "displayname": "mx3d.24x240", + "value": "mx3d.24x240" + }, + { + "displayname": "mx3d.32x320", + "value": "mx3d.32x320" + }, + { + "displayname": "mx3d.48x480", + "value": "mx3d.48x480" + }, + { + "displayname": "mx3d.64x640", + "value": "mx3d.64x640" + }, + { + "displayname": "mx3d.96x960", + "value": "mx3d.96x960" + }, + { + "displayname": "bx2d.metal.96x384 (Only available in Toronto (ca-tor))", + "value": "bx2d.metal.96x384" + }, + { + "displayname": "cx2d.metal.96x192 (Only available in Toronto (ca-tor)) ", + "value": "cx2d.metal.96x192" + }, + { + "displayname": "mx2d.metal.96x768 (Only available in Toronto (ca-tor))) ", + "value": "mx2d.metal.96x768" + }, + { "displayname": "mx2.16x128.2000gb (Not available in Sao Paulo (br-sao), Montreal (ca-mon), Madrid (eu-es), Osaka (jp-osa))", + "value": "mx2.16x128.2000gb" + }, + { + "displayname": "ox2.128x1024 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.128x1024" + }, + { + "displayname": "ox2.16x128 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.16x128" + }, + { + "displayname": "ox2.32x256 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.32x256" + }, + { + "displayname": "ox2.64x512 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.64x512" + }, + { + "displayname": "ox2.8x64 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.8x64" + }, + { + "displayname": "ox2.96x768 (Not available in Sao Paulo (br-sao), Montreal (ca-mon))", + "value": "ox2.96x768" + } + ] }, { "key": "default_worker_pool_workers_per_zone", @@ -190,22 +414,74 @@ ] }, { - "key": "provider_visibility", - "options": [ - { - "displayname": "private", - "value": "private" + "key": "existing_vpc_crn", + "required": true + }, + { + "key": "region", + "required": true, + "type": "string", + "custom_config": { + "config_constraints": { + "generationType": "2" }, + "grouping": "deployment", + "original_grouping": "deployment", + "type": "vpc_region" + }, + "description": "Region in which all the resources will be deployed. [Learn More](https://terraform-ibm-modules.github.io/documentation/#/region).", + "virtual": true, + "default_value": "us-south" + }, + { + "key": "existing_cos_instance_crn", + "required": true + }, + { + "key": "enable_platform_metrics", + "type": "string", + "default_value": "true", + "description": "When set to `true`, the IBM Cloud Monitoring instance will be configured to collect platform metrics from the provided region. ⚠️ You can configure 1 instance only of the IBM Cloud Monitoring service per region to collect platform metrics in that location. Check with the account or service administrator if another monitoring instance has already been configured. You may not have permissions to see all monitoring instances in the region. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-platform_metrics_enabling).", + "required": true, + "virtual": true, + "options": [ { - "displayname": "public", - "value": "public" + "displayname": "true", + "value": "true" }, { - "displayname": "public-and-private", - "value": "public-and-private" + "displayname": "false", + "value": "false" } ] }, + { + "key": "logs_routing_tenant_regions", + "type": "list(string)", + "default_value": "[]", + "description": "To manage platform logs that are generated by IBM Cloud services in a region of IBM Cloud, you must create a tenant in each region that you operate. Pass a list of regions to create a tenant in. For example: [\"us-south\", \"us-east\"]. [Learn more](https://cloud.ibm.com/docs/logs-router?topic=logs-router-about-platform-logs).", + "required": true, + "virtual": true, + "custom_config": { + "grouping": "deployment", + "original_grouping": "deployment", + "config_constraints": { + "type": "string" + } + } + }, + { + "key": "existing_resource_group_name", + "display_name": "resource_group", + "custom_config": { + "type": "resource_group", + "grouping": "deployment", + "original_grouping": "deployment", + "config_constraints": { + "identifier": "rg_name" + } + } + }, { "key": "cluster_resource_tags", "custom_config": { @@ -262,10 +538,22 @@ "key": "manage_all_addons" }, { - "key": "additional_worker_pools" + "key": "additional_worker_pools", + "type": "array", + "custom_config": { + "type": "textarea", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { - "key": "worker_pools_taints" + "key": "worker_pools_taints", + "type": "array", + "custom_config": { + "type": "textarea", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { "key": "ignore_worker_pool_size_changes" @@ -368,13 +656,14 @@ "displayname": "Private", "value": "private" } - ] + ], + "hidden": true }, { - "key": "cluster_key_name" + "key": "cluster_kms_key_name" }, { - "key": "cluster_key_ring_name" + "key": "cluster_kms_key_ring_name" }, { "key": "kms_encryption_enabled_boot_volume" @@ -383,13 +672,20 @@ "key": "existing_boot_volume_kms_key_crn" }, { - "key": "boot_volume_key_name" + "key": "boot_volume_kms_key_name" }, { - "key": "boot_volume_key_ring_name" + "key": "boot_volume_kms_key_ring_name" }, { - "key": "cbr_rules" + "key": "cbr_rules", + "display_name": "openshift_cluster_cbr_rules", + "type": "array", + "custom_config": { + "type": "textarea", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { "key": "enable_secrets_manager_integration" @@ -401,26 +697,46 @@ "key": "secrets_manager_secret_group_id" }, { - "key": "secrets_manager_endpoint_type" + "key": "secrets_manager_endpoint_type", + "hidden": true + }, + { + "key": "secrets_manager_service_plan" }, { "key": "skip_ocp_secrets_manager_iam_auth_policy" + }, + { + "key": "provider_visibility", + "options": [ + { + "displayname": "private", + "value": "private" + }, + { + "displayname": "public", + "value": "public" + }, + { + "displayname": "public-and-private", + "value": "public-and-private" + } + ], + "hidden": true } ], "dependencies": [ { "name": "deploy-arch-ibm-vpc", + "description": "Configure the VPC instance and subnets where the OpenShift cluster will be deployed. ", "id": "2af61763-f8ef-4527-a815-b92166f29bc8-global", - "version": "^v7.21.0", + "version": "v7.24.0", "flavors": [ "fully-configurable" ], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "optional": true, "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "dependency_input": "prefix", @@ -432,6 +748,11 @@ "version_input": "existing_resource_group_name", "reference_version": true }, + { + "dependency_input":"region", + "version_input":"region", + "reference_version": true + }, { "dependency_output": "vpc_crn", "version_input": "existing_vpc_crn" @@ -440,14 +761,14 @@ }, { "name": "deploy-arch-ibm-account-infra-base", + "description": "Cloud automation for Account Configuration organizes your IBM Cloud account with a ready-made set of resource groups by default and, when you enable the \"with Account Settings\" option, it also applies baseline security and governance settings. ", "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "flavors": [ - "standard" + "resource-group-only", + "resource-groups-with-account-settings" ], + "default_flavor": "resource-group-only", "id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global", - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "dependency_output": "workload_resource_group_name", @@ -460,22 +781,20 @@ } ], "optional": true, - "on_by_default": true, - "version": "^v1.18.0" + "on_by_default": false, + "version": "v3.0.7" }, { - "name": "testing-deploy-arch-ibm-kms", - "id": "85fdbd7a-8c77-4abd-b716-653a31f3aba9-global", - "version": "^v1.2.1", + "name": "deploy-arch-ibm-kms", + "description": "Enable Cloud Automation for Key Protect when you want services to use your own managed encryption keys. If disabled, it will fall back on IBM Cloud's default service-managed encryption. ", + "id": "2cad4789-fa90-4886-9c9e-857081c273ee-global", + "version": "v5.1.4", "flavors": [ - "standard" + "fully-configurable" ], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "optional": true, "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "version_input": "kms_encryption_enabled_cluster", @@ -486,7 +805,7 @@ "version_input": "existing_kms_instance_crn" }, { - "dependency_input": "resource_group_name", + "dependency_input": "existing_resource_group_name", "version_input": "existing_resource_group_name", "reference_version": true }, @@ -494,30 +813,23 @@ "dependency_input": "prefix", "version_input": "prefix", "reference_version": true - }, - { - "dependency_input": "use_existing_resource_group", - "value": true, - "reference_version": true } ] }, { "name": "deploy-arch-ibm-cos", + "description": "Enable to create a Cloud Object Storage (COS) instance, where an object storage bucket can be provisioned and used as the internal registry storage for OpenShift cluster. ", "id": "68921490-2778-4930-ac6d-bae7be6cd958-global", - "version": "^v8.20.1", + "version": "v9.0.2", "flavors": [ "instance" ], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "optional": true, "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { - "dependency_output": "cos_instance_id", + "dependency_output": "cos_instance_crn", "version_input": "existing_cos_instance_crn" }, { @@ -526,65 +838,71 @@ "reference_version": true }, { - "dependency_input": "resource_group_name", + "dependency_input": "existing_resource_group_name", "version_input": "existing_resource_group_name", "reference_version": true - }, - { - "dependency_input": "use_existing_resource_group", - "value": true, - "reference_version": true } ] }, { - "name": "testing-deploy-arch-ibm-observability", - "id": "daf2cf91-2384-4205-b7f4-621299a4896d-global", - "version": "^1.3.0", + "name": "deploy-arch-ibm-observability", + "description": "Configure IBM Cloud Logs, Cloud Monitoring and Activity Tracker event routing for analysing logs and metrics generated by the OpenShift cluster. ", + "id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global", + "version": "v3.0.3", "flavors": [ - "standard" + "instances" ], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "optional": true, "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "dependency_input": "prefix", "version_input": "prefix", "reference_version": true + }, + { + "dependency_input": "enable_platform_metrics", + "version_input": "enable_platform_metrics", + "reference_version": true + }, + { + "dependency_input": "logs_routing_tenant_regions", + "version_input": "logs_routing_tenant_regions", + "reference_version": true } ] }, { - "name": "testing-deploy-arch-ibm-secrets-manager", - "id": "5f149ae6-d781-460a-977d-c8c4171ad0fa-global", - "version": "^1.2.2", + "name": "deploy-arch-ibm-secrets-manager", + "description": "Configure Secrets Manager instance for centrally managing Ingress subdomain certificates and other secrets. ", + "id": "6d6ebc76-7bbd-42f5-8bc7-78f4fabd5944-global", + "version": "v2.4.0", "flavors": [ - "standard" + "fully-configurable" ], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "optional": true, "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "dependency_input": "prefix", "version_input": "prefix", "reference_version": true }, + { + "dependency_input": "service_plan", + "version_input": "secrets_manager_service_plan", + "reference_version": true + }, { "dependency_input": "secrets_manager_endpoint_type", "version_input": "secrets_manager_endpoint_type", "reference_version": true }, { - "dependency_input": "use_existing_resource_group", - "value": true, + "dependency_input": "existing_resource_group_name", + "version_input": "existing_resource_group_name", "reference_version": true }, { @@ -598,7 +916,8 @@ ] } ], - "dependency_version_2": true + "dependency_version_2": true, + "terraform_version": "1.10.5" } ] } diff --git a/reference-architecture/deployable-architecture-ocp-cluster.svg b/reference-architecture/deployable-architecture-ocp-cluster.svg index 5c0905f2..32f7ec8e 100644 --- a/reference-architecture/deployable-architecture-ocp-cluster.svg +++ b/reference-architecture/deployable-architecture-ocp-cluster.svg @@ -1,4 +1,4 @@ -
IBM Cloud
IBM Cloud
Region
Region
Existing VPC
Existing VPC
Existing Zones
Existing Zones
Existing Subnet
Existing Subnet
OCP Cluster
OCP Cluster
OCP WorkerOCP Worker
Text is not SVG - cannot display
+
ACL
locked
IBM Cloud
Region
Cloud logs
Observability
[Optional]
Cloud MonitoringSecrets ManagerRegistry Bucket
[Optional] Cloud Object Storage 
[Optional] KMS
Key Ring
registry-bucket-encryption-key
Resource GroupVPC
Zone 3
OpenShift
Zone 2
Zone 1
Worker NodeWorker Node
Worker Pool
\ No newline at end of file diff --git a/solutions/fully-configurable/DA_docs.md b/solutions/fully-configurable/DA_docs.md index 2e51ee91..8e24f718 100644 --- a/solutions/fully-configurable/DA_docs.md +++ b/solutions/fully-configurable/DA_docs.md @@ -127,12 +127,12 @@ This variable defines the worker node pools for your OCP cluster, with each pool { vpc_subnets = [ { - id = "0717-a4b3c2d1-e5f6-g7h8-i9j0-k1l2m3n4o5p6" # pragma: allowlist secret + id = "" zone = "us-south-1" cidr_block = " "10.10.10.0/24" }, { - id = "0717-b4c3d2e1-f5g6-h7i8-j9k0-l1m2n3o4p5q6" # pragma: allowlist secret + id = "" zone = "us-south-2" cidr_block = "10.20.10.0/24" } @@ -230,10 +230,10 @@ This variable allows you to provide a rule for the target service to enforce acc ### Example for cbr_rules ```hcl -cbr_rules = [ +[ { description = "Event Notifications can be accessed from xyz" - account_id = "defc0df06b644a9cabc6e44f55b3880s." + account_id = "" rule_contexts= [{ attributes = [ { @@ -242,11 +242,11 @@ cbr_rules = [ }, { name = "networkZoneId" - value = "93a51a1debe2674193217209601dde6f" # pragma: allowlist secret + value = "" } ] } - ] + ] enforcement_mode = "enabled" operations = [{ api_types = [{ diff --git a/solutions/fully-configurable/README.md b/solutions/fully-configurable/README.md index 5d40f712..d9cdd771 100644 --- a/solutions/fully-configurable/README.md +++ b/solutions/fully-configurable/README.md @@ -1,131 +1,3 @@ -# Fully-configurable OCP VPC cluster +# Cloud automation for Red Hat OpenShift Container Platform on VPC (Fully configurable) -This architecture creates a fully-configurable 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: - -- OCP VPC cluster. -- Cluster keys if an existing KMS instance is passed. - - -![ocp-cluster](../../reference-architecture/deployable-architecture-ocp-cluster.svg) - - - -### Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >=1.9.0 | -| [ibm](#requirement\_ibm) | 1.79.2 | - -### Modules - -| Name | Source | Version | -|------|--------|---------| -| [existing\_boot\_volume\_kms\_key\_crn\_parser](#module\_existing\_boot\_volume\_kms\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 | -| [existing\_cluster\_kms\_key\_crn\_parser](#module\_existing\_cluster\_kms\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 | -| [existing\_kms\_crn\_parser](#module\_existing\_kms\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 | -| [existing\_secrets\_manager\_instance\_parser](#module\_existing\_secrets\_manager\_instance\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 | -| [existing\_vpc\_crn\_parser](#module\_existing\_vpc\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 | -| [kms](#module\_kms) | terraform-ibm-modules/kms-all-inclusive/ibm | 5.1.8 | -| [ocp\_base](#module\_ocp\_base) | ../.. | n/a | -| [resource\_group](#module\_resource\_group) | terraform-ibm-modules/resource-group/ibm | 1.2.1 | -| [secret\_group](#module\_secret\_group) | terraform-ibm-modules/secrets-manager-secret-group/ibm | 1.3.7 | - -### Resources - -| Name | Type | -|------|------| -| [terraform_data.delete_secrets](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource | -| [ibm_is_subnet.subnets](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.79.2/docs/data-sources/is_subnet) | data source | -| [ibm_is_subnets.vpc_subnets](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.79.2/docs/data-sources/is_subnets) | data source | - -### Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [access\_tags](#input\_access\_tags) | A list of access tags to apply to the resources created by the module. | `list(string)` | `[]` | no | -| [additional\_lb\_security\_group\_ids](#input\_additional\_lb\_security\_group\_ids) | Additional security groups to add to the load balancers associated with the cluster. Ensure that the `number_of_lbs` is set to the number of LBs associated with the cluster. This comes in addition to the IBM maintained security group. | `list(string)` | `[]` | no | -| [additional\_security\_group\_ids](#input\_additional\_security\_group\_ids) | A list of security group IDs that are attached to the worker nodes for additional network security controls. | `list(string)` | `[]` | no | -| [additional\_vpe\_security\_group\_ids](#input\_additional\_vpe\_security\_group\_ids) | Additional security groups to add to all existing load balancers. This comes in addition to the IBM maintained security group. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-additional-vpe-security-group-ids) |
object({
master = optional(list(string), [])
registry = optional(list(string), [])
api = optional(list(string), [])
})
| `{}` | no | -| [additional\_worker\_pools](#input\_additional\_worker\_pools) | List of additional worker pools. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-worker-pools) |
list(object({
vpc_subnets = optional(list(object({
id = string
zone = string
cidr_block = string
})), [])
pool_name = string
machine_type = string
workers_per_zone = number
operating_system = string
labels = optional(map(string))
minSize = optional(number)
secondary_storage = optional(string)
maxSize = optional(number)
enableAutoscaling = optional(bool)
additional_security_group_ids = optional(list(string))
}))
| `[]` | no | -| [addons](#input\_addons) | Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-addons) |
object({
debug-tool = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
image-key-synchronizer = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
openshift-data-foundation = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
vpc-file-csi-driver = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
static-route = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
cluster-autoscaler = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
vpc-block-csi-driver = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
ibm-storage-operator = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
openshift-ai = optional(object({
version = optional(string)
parameters_json = optional(string)
}))
})
| `{}` | no | -| [allow\_default\_worker\_pool\_replacement](#input\_allow\_default\_worker\_pool\_replacement) | Set to true to allow the module to recreate a default worker pool. Only use in the case where you are getting an error indicating that the default worker pool cannot be replaced on apply. Once the default worker pool is handled separately, if you wish to make any change to the default worker pool which requires the re-creation of the default pool set this variable to true. | `bool` | `false` | no | -| [attach\_ibm\_managed\_security\_group](#input\_attach\_ibm\_managed\_security\_group) | Specify whether to attach the IBM-defined default security group (whose name is kube-) to all worker nodes. Only applicable if `custom_security_group_ids` is set. | `bool` | `true` | no | -| [boot\_volume\_key\_name](#input\_boot\_volume\_key\_name) | The name for the key created for the block storage volumes. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"boot-volume-key"` | no | -| [boot\_volume\_key\_ring\_name](#input\_boot\_volume\_key\_ring\_name) | The name for the key ring created for the block storage volumes key. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"boot-volume-key-ring"` | no | -| [cbr\_rules](#input\_cbr\_rules) | The list of context-based restriction rules to create. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-cbr) |
list(object({
description = string
account_id = string
rule_contexts = list(object({
attributes = optional(list(object({
name = string
value = string
}))) }))
enforcement_mode = string
tags = optional(list(object({
name = string
value = string
})), [])
operations = optional(list(object({
api_types = list(object({
api_type_id = string
}))
})))
}))
| `[]` | no | -| [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | Specify which type of endpoint to use for cluster config access: 'default', 'private', 'vpe', 'link'. A 'default' value uses the default endpoint of the cluster. | `string` | `"default"` | no | -| [cluster\_key\_name](#input\_cluster\_key\_name) | The name of the key to be created for the cluster's Object Storage bucket encryption. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"cluster-key"` | no | -| [cluster\_key\_ring\_name](#input\_cluster\_key\_ring\_name) | The name of the key ring to be created for the cluster's Object Storage bucket encryption key. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"cluster-key-ring"` | no | -| [cluster\_name](#input\_cluster\_name) | The name of the new IBM Cloud OpenShift Cluster. If a `prefix` input variable is specified, it is added to this name in the `-value` format. | `string` | `"openshift"` | no | -| [cluster\_ready\_when](#input\_cluster\_ready\_when) | The cluster is ready based on one of the following:: MasterNodeReady (not recommended), OneWorkerNodeReady, Normal, IngressReady. | `string` | `"IngressReady"` | no | -| [cluster\_resource\_tags](#input\_cluster\_resource\_tags) | Metadata labels describing this cluster deployment, i.e. test. | `list(string)` | `[]` | no | -| [custom\_security\_group\_ids](#input\_custom\_security\_group\_ids) | Security groups to add to all worker nodes. This comes in addition to the IBM maintained security group if `attach_ibm_managed_security_group` is set to true. If this variable is set, the default VPC security group is NOT assigned to the worker nodes. | `list(string)` | `null` | no | -| [default\_pool\_maximum\_number\_of\_nodes](#input\_default\_pool\_maximum\_number\_of\_nodes) | The maximum number of worker nodes allowed in the pool, preventing the pool from exceeding three workers. | `number` | `3` | no | -| [default\_pool\_minimum\_number\_of\_nodes](#input\_default\_pool\_minimum\_number\_of\_nodes) | The minimum number of worker nodes allowed in the pool, ensuring at least one worker is always running. | `number` | `1` | no | -| [default\_worker\_pool\_labels](#input\_default\_worker\_pool\_labels) | A set of key-value labels assigned to the worker pool for identification. For Example: { env = "prod", team = "devops" } | `map(string)` | `{}` | no | -| [default\_worker\_pool\_machine\_type](#input\_default\_worker\_pool\_machine\_type) | The machine type for worker nodes.[Learn more](https://cloud.ibm.com/docs/openshift?topic=openshift-vpc-flavors) | `string` | `"bx2.8x32"` | no | -| [default\_worker\_pool\_operating\_system](#input\_default\_worker\_pool\_operating\_system) | The operating system installed on the worker nodes. [Learn more](https://cloud.ibm.com/docs/openshift?topic=openshift-vpc-flavors) | `string` | `"RHEL_9_64"` | no | -| [default\_worker\_pool\_workers\_per\_zone](#input\_default\_worker\_pool\_workers\_per\_zone) | Number of worker nodes in each zone of the cluster. | `number` | `2` | no | -| [disable\_outbound\_traffic\_protection](#input\_disable\_outbound\_traffic\_protection) | Whether to allow public outbound access from the cluster workers. This is only applicable for OCP 4.15 and later. | `bool` | `false` | no | -| [disable\_public\_endpoint](#input\_disable\_public\_endpoint) | Whether access to the public service endpoint is disabled when the cluster is created. Does not affect existing clusters. You can't disable a public endpoint on an existing cluster, so you can't convert a public cluster to a private cluster. To change a public endpoint to private, create another cluster with this input set to `true`. | `bool` | `true` | no | -| [enable\_autoscaling\_for\_default\_pool](#input\_enable\_autoscaling\_for\_default\_pool) | Set `true` to enable automatic scaling of worker based on workload demand. | `bool` | `false` | no | -| [enable\_ocp\_console](#input\_enable\_ocp\_console) | Flag to specify whether to enable or disable the OpenShift console. If set to `null` the module does not modify the current setting on the cluster. Keep in mind that when this input is set to `true` or `false` on a cluster with private only endpoint enabled, the runtime must be able to access the private endpoint. | `bool` | `null` | no | -| [enable\_secrets\_manager\_integration](#input\_enable\_secrets\_manager\_integration) | Integrate with IBM Cloud Secrets Manager so you can centrally manage Ingress subdomain certificates and other secrets. [Learn more](https://cloud.ibm.com/docs/containers?topic=containers-secrets-mgr) | `bool` | `false` | no | -| [existing\_boot\_volume\_kms\_key\_crn](#input\_existing\_boot\_volume\_kms\_key\_crn) | The CRN of an existing KMS key to use to encrypt the the block storage volumes for VPC. If no value is set for this variable, specify a value for either the `existing_kms_instance_crn` variable to create a key ring and key. | `string` | `null` | no | -| [existing\_cluster\_kms\_key\_crn](#input\_existing\_cluster\_kms\_key\_crn) | The CRN of an existing KMS key to use for encrypting the Object Storage of the Cluster. If no value is set for this variable, specify a value for `existing_kms_instance_crn` variable to create a key ring and key. | `string` | `null` | no | -| [existing\_cos\_instance\_crn](#input\_existing\_cos\_instance\_crn) | The CRN of an already existing Object Storage instance to use for OpenShift internal registry storage. | `string` | n/a | yes | -| [existing\_kms\_instance\_crn](#input\_existing\_kms\_instance\_crn) | The CRN of an existing KMS instance (Hyper Protect Crypto Services or Key Protect). If the KMS instance is in different account you must also provide a value for `ibmcloud_kms_api_key`. | `string` | `null` | no | -| [existing\_resource\_group\_name](#input\_existing\_resource\_group\_name) | The name of an existing resource group to provision the cluster. | `string` | `"Default"` | no | -| [existing\_secrets\_manager\_instance\_crn](#input\_existing\_secrets\_manager\_instance\_crn) | CRN of the Secrets Manager instance where Ingress certificate secrets are stored. If 'enable\_secrets\_manager\_integration' is set to true then this value is required. | `string` | `null` | no | -| [existing\_subnet\_ids](#input\_existing\_subnet\_ids) | The list of IDs of existing subnets where the default worker pool nodes of the cluster are provisioned. | `list(string)` | `[]` | no | -| [existing\_vpc\_crn](#input\_existing\_vpc\_crn) | The CRN of an existing VPC. If the user provides only the `existing_vpc_crn` the default worker pool is provisioned across all the subnets in the VPC. | `string` | n/a | yes | -| [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud api key. | `string` | n/a | yes | -| [ibmcloud\_kms\_api\_key](#input\_ibmcloud\_kms\_api\_key) | The IBM Cloud API key that can create a root key and key ring in the key management service (KMS) instance for the cluster. If not specified, the 'ibmcloud\_api\_key' variable is used. Specify this key if the KMS instance in `existing_kms_instance_crn` is in an account that is different from the cluster's account. Leave this input empty if both the cluster and the KMS instance are in the same account. | `string` | `null` | no | -| [ignore\_worker\_pool\_size\_changes](#input\_ignore\_worker\_pool\_size\_changes) | Enable if using worker autoscaling. Stops Terraform managing worker count. | `bool` | `false` | no | -| [kms\_encryption\_enabled\_boot\_volume](#input\_kms\_encryption\_enabled\_boot\_volume) | Set this to true to control the encryption keys used to encrypt the data that for the block storage volumes for VPC. If set to false, the data is encrypted by using randomly generated keys. For more info on encrypting block storage volumes, see https://cloud.ibm.com/docs/vpc?topic=vpc-creating-instances-byok | `bool` | `false` | no | -| [kms\_encryption\_enabled\_cluster](#input\_kms\_encryption\_enabled\_cluster) | Set to true to enable KMS encryption for the cluster's Object Storage bucket. When set to true, a value must be passed for either `existing_cluster_kms_key_crn` or `existing_kms_instance_crn`. | `bool` | `false` | no | -| [kms\_endpoint\_type](#input\_kms\_endpoint\_type) | The endpoint for communicating with the KMS instance. Possible values: `public`, `private`. Applies only if `kms_encryption_enabled_cluster` is true | `string` | `"private"` | no | -| [manage\_all\_addons](#input\_manage\_all\_addons) | Instructs deployable architecture to manage all cluster addons, even if addons were installed outside of the module. If set to 'true' this deployable architecture destroys any addons that were installed by other sources. | `bool` | `false` | no | -| [number\_of\_lbs](#input\_number\_of\_lbs) | The number of LBs to associated the `additional_lb_security_group_names` security group with. | `number` | `1` | no | -| [ocp\_entitlement](#input\_ocp\_entitlement) | Value that is applied to the entitlements for OCP cluster provisioning. | `string` | `null` | no | -| [ocp\_version](#input\_ocp\_version) | Version of the OCP cluster to provision. | `string` | `"4.17"` | no | -| [pod\_subnet\_cidr](#input\_pod\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for pods. The subnet must have a CIDR of at least `/23` or larger. Default value is `172.30.0.0/16` when the variable is set to `null`. | `string` | `null` | no | -| [prefix](#input\_prefix) | The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To not use any prefix value, you can set this value to `null` or an empty string. | `string` | n/a | yes | -| [provider\_visibility](#input\_provider\_visibility) | Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints). | `string` | `"private"` | no | -| [secrets\_manager\_endpoint\_type](#input\_secrets\_manager\_endpoint\_type) | The type of endpoint (public or private) to connect to the Secrets Manager API. The Terraform provider uses this endpoint type to interact with the Secrets Manager API. | `string` | `"private"` | no | -| [secrets\_manager\_secret\_group\_id](#input\_secrets\_manager\_secret\_group\_id) | Secret group ID where Ingress secrets are stored in the Secrets Manager instance. If 'enable\_secrets\_manager\_integration' is set to true and 'secrets\_manager\_secret\_group\_id' is not provided, a new group will be created with the same name as cluster\_id. | `string` | `null` | no | -| [service\_subnet\_cidr](#input\_service\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for services. The subnet must be at least `/24` or larger. Default value is `172.21.0.0/16` when the variable is set to `null`. | `string` | `null` | no | -| [skip\_ocp\_secrets\_manager\_iam\_auth\_policy](#input\_skip\_ocp\_secrets\_manager\_iam\_auth\_policy) | To skip creating auth policy that allows OCP cluster 'Manager' role access in the existing Secrets Manager instance for managing ingress certificates. | `bool` | `false` | no | -| [use\_private\_endpoint](#input\_use\_private\_endpoint) | Set this to true to force all API calls to use the IBM Cloud private endpoints. | `bool` | `true` | no | -| [verify\_worker\_network\_readiness](#input\_verify\_worker\_network\_readiness) | By setting this to true, a script runs kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, set this value to false. | `bool` | `true` | no | -| [worker\_pools\_taints](#input\_worker\_pools\_taints) | Optional, Map of lists containing node taints by node-pool name. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-worker-pools-taints) | `map(list(object({ key = string, value = string, effect = string })))` | `null` | no | - -### Outputs - -| Name | Description | -|------|-------------| -| [api\_vpe](#output\_api\_vpe) | Details of the API Virtual Private Endpoint (VPE), if it exists. For more info about schema, see https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_virtual_endpoint_gateway | -| [cluster\_crn](#output\_cluster\_crn) | The Cloud Resource Name (CRN) of the provisioned OpenShift cluster. | -| [cluster\_id](#output\_cluster\_id) | The unique identifier assigned to the provisioned OpenShift cluster. | -| [cluster\_name](#output\_cluster\_name) | The name of the provisioned OpenShift cluster. | -| [cos\_crn](#output\_cos\_crn) | The Cloud Resource Name (CRN) of the Object Storage instance associated with the cluster. | -| [ingress\_hostname](#output\_ingress\_hostname) | The hostname assigned to the Cluster's Ingress subdomain for external access. | -| [kms\_config](#output\_kms\_config) | Configuration details for Key Management Service (KMS) used for encryption in the cluster. | -| [master\_status](#output\_master\_status) | The current status of the Kubernetes master node in the cluster. | -| [master\_url](#output\_master\_url) | The API endpoint URL for the Kubernetes master node of the cluster. | -| [master\_vpe](#output\_master\_vpe) | Details of the master, or default Virtual Private Endpoint (VPE). For more info about schema, see https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_virtual_endpoint_gateway | -| [ocp\_version](#output\_ocp\_version) | The version of OpenShift running on the provisioned cluster. | -| [operating\_system](#output\_operating\_system) | The operating system used by the worker nodes in the default worker pool. | -| [private\_service\_endpoint\_url](#output\_private\_service\_endpoint\_url) | The Private service endpoint URL for accessing the cluster over a private network. | -| [public\_service\_endpoint\_url](#output\_public\_service\_endpoint\_url) | The public service endpoint URL for accessing the cluster over the internet. | -| [region](#output\_region) | The IBM Cloud region where the cluster is deployed. | -| [registry\_vpe](#output\_registry\_vpe) | Details of the registry Virtual Private Endpoint (VPE), if it exists. For more info about schema, see https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_virtual_endpoint_gateway | -| [resource\_group\_id](#output\_resource\_group\_id) | The ID of the resource group where the cluster is deployed. | -| [secrets\_manager\_integration\_config](#output\_secrets\_manager\_integration\_config) | Information about the Secrets Manager instance that is used to store the Ingress certificates. | -| [vpc\_id](#output\_vpc\_id) | The ID of the Virtual Private Cloud (VPC) in which the cluster is deployed. | -| [vpe\_url](#output\_vpe\_url) | The Virtual Private Endpoint (VPE) URL used for private network access to the cluster. | -| [workerpools](#output\_workerpools) | A list of worker pools associated with the provisioned cluster | - +:exclamation: **Important:** This solution is not intended to be called by other modules because it contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers). diff --git a/solutions/fully-configurable/main.tf b/solutions/fully-configurable/main.tf index 47094e91..29c3607d 100644 --- a/solutions/fully-configurable/main.tf +++ b/solutions/fully-configurable/main.tf @@ -39,11 +39,11 @@ locals { cluster_existing_kms_guid = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_cluster ? module.existing_kms_crn_parser[0].service_instance : var.existing_cluster_kms_key_crn != null ? module.existing_cluster_kms_key_crn_parser[0].service_instance : null cluster_kms_account_id = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_cluster ? module.existing_kms_crn_parser[0].account_id : var.existing_cluster_kms_key_crn != null ? module.existing_cluster_kms_key_crn_parser[0].account_id : null cluster_kms_key_id = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_cluster ? module.kms[0].keys[format("%s.%s", local.cluster_key_ring_name, local.cluster_key_name)].key_id : var.existing_cluster_kms_key_crn != null ? module.existing_cluster_kms_key_crn_parser[0].resource : null - cluster_key_ring_name = "${local.prefix}${var.cluster_key_ring_name}" - cluster_key_name = "${local.prefix}${var.cluster_key_name}" + cluster_key_ring_name = "${local.prefix}${var.cluster_kms_key_ring_name}" + cluster_key_name = "${local.prefix}${var.cluster_kms_key_name}" - boot_volume_key_ring_name = "${local.prefix}${var.boot_volume_key_ring_name}" - boot_volume_key_name = "${local.prefix}${var.boot_volume_key_name}" + boot_volume_key_ring_name = "${local.prefix}${var.boot_volume_kms_key_ring_name}" + boot_volume_key_name = "${local.prefix}${var.boot_volume_kms_key_name}" boot_volume_existing_kms_guid = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_boot_volume ? module.existing_kms_crn_parser[0].service_instance : var.existing_boot_volume_kms_key_crn != null ? module.existing_boot_volume_kms_key_crn_parser[0].service_instance : null boot_volume_kms_account_id = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_boot_volume ? module.existing_kms_crn_parser[0].account_id : var.existing_boot_volume_kms_key_crn != null ? module.existing_boot_volume_kms_key_crn_parser[0].account_id : null boot_volume_kms_key_id = var.existing_kms_instance_crn != null && var.kms_encryption_enabled_boot_volume ? module.kms[0].keys[format("%s.%s", local.boot_volume_key_ring_name, local.boot_volume_key_name)].key_id : var.existing_boot_volume_kms_key_crn != null ? module.existing_boot_volume_kms_key_crn_parser[0].resource : null diff --git a/solutions/fully-configurable/provider.tf b/solutions/fully-configurable/provider.tf index ebbc8672..a476e329 100644 --- a/solutions/fully-configurable/provider.tf +++ b/solutions/fully-configurable/provider.tf @@ -3,21 +3,24 @@ ######################################################################################################################## provider "ibm" { - ibmcloud_api_key = var.ibmcloud_api_key - region = local.vpc_region - visibility = var.provider_visibility + ibmcloud_api_key = var.ibmcloud_api_key + region = local.vpc_region + visibility = var.provider_visibility + private_endpoint_type = (var.provider_visibility == "private" && local.vpc_region == "ca-mon") ? "vpe" : null } provider "ibm" { - alias = "kms" - ibmcloud_api_key = var.ibmcloud_kms_api_key != null ? var.ibmcloud_kms_api_key : var.ibmcloud_api_key - region = local.cluster_kms_region - visibility = var.provider_visibility + alias = "kms" + ibmcloud_api_key = var.ibmcloud_kms_api_key != null ? var.ibmcloud_kms_api_key : var.ibmcloud_api_key + region = local.cluster_kms_region + visibility = var.provider_visibility + private_endpoint_type = (var.provider_visibility == "private" && local.vpc_region == "ca-mon") ? "vpe" : null } provider "ibm" { - alias = "secrets_manager" - ibmcloud_api_key = var.ibmcloud_api_key - region = var.enable_secrets_manager_integration ? module.existing_secrets_manager_instance_parser[0].region : local.vpc_region - visibility = var.provider_visibility + alias = "secrets_manager" + ibmcloud_api_key = var.ibmcloud_api_key + region = var.enable_secrets_manager_integration ? module.existing_secrets_manager_instance_parser[0].region : local.vpc_region + visibility = var.provider_visibility + private_endpoint_type = (var.provider_visibility == "private" && local.vpc_region == "ca-mon") ? "vpe" : null } diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 31e4ec1d..894c874b 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -13,19 +13,32 @@ variable "ibmcloud_api_key" { variable "prefix" { type = string - description = "The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To not use any prefix value, you can set this value to `null` or an empty string." nullable = true + description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: prod-0405-ocp. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)." + validation { - condition = (var.prefix == null ? true : + # - null and empty string is allowed + # - Must not contain consecutive hyphens (--): length(regexall("--", var.prefix)) == 0 + # - Starts with a lowercase letter: [a-z] + # - Contains only lowercase letters (a–z), digits (0–9), and hyphens (-) + # - Must not end with a hyphen (-): [a-z0-9] + condition = (var.prefix == null || var.prefix == "" ? true : alltrue([ - can(regex("^[a-z]{0,1}[-a-z0-9]{0,14}[a-z0-9]{0,1}$", var.prefix)), - length(regexall("^.*--.*", var.prefix)) == 0 + can(regex("^[a-z][-a-z0-9]*[a-z0-9]$", var.prefix)), + length(regexall("--", var.prefix)) == 0 ]) ) - error_message = "Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters." + error_message = "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--')." + } + + validation { + # must not exceed 16 characters in length + condition = length(var.prefix) <= 16 + error_message = "Prefix must not exceed 16 characters." } } + variable "existing_resource_group_name" { type = string description = "The name of an existing resource group to provision the cluster." @@ -118,7 +131,7 @@ variable "addons" { parameters_json = optional(string) })) }) - description = "Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-addons)" + description = "Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). [Check supported addons and versions here](https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions). [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/main/solutions/fully-configurable/DA_docs.md#options-with-addons)" nullable = false default = {} } @@ -406,13 +419,13 @@ variable "kms_endpoint_type" { } } -variable "cluster_key_ring_name" { +variable "cluster_kms_key_ring_name" { type = string default = "cluster-key-ring" description = "The name of the key ring to be created for the cluster's Object Storage bucket encryption key. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format." } -variable "cluster_key_name" { +variable "cluster_kms_key_name" { type = string default = "cluster-key" description = "The name of the key to be created for the cluster's Object Storage bucket encryption. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format." @@ -461,13 +474,13 @@ variable "existing_boot_volume_kms_key_crn" { } } -variable "boot_volume_key_ring_name" { +variable "boot_volume_kms_key_ring_name" { type = string default = "boot-volume-key-ring" description = "The name for the key ring created for the block storage volumes key. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format." } -variable "boot_volume_key_name" { +variable "boot_volume_kms_key_name" { type = string default = "boot-volume-key" description = "The name for the key created for the block storage volumes. Applies only if not specifying an existing key. If a prefix input variable is specified, the prefix is added to the name in the `-` format." @@ -538,6 +551,21 @@ variable "secrets_manager_endpoint_type" { } } +# tflint-ignore: all +variable "secrets_manager_service_plan" { + type = string + description = "The pricing plan to use when provisioning a Secrets Manager instance. Possible values: `standard`, `trial`. You can create only one Trial instance of Secrets Manager per account. Before you can create a new Trial instance, you must delete the existing Trial instance and its reclamation. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-create-instance&interface=ui#upgrade-instance-standard)." + default = "standard" + validation { + condition = contains(["standard", "trial"], var.secrets_manager_service_plan) + error_message = "Only 'standard' and 'trial' are allowed values for 'service_plan'. Applies only if not providing a value for the 'existing_secrets_manager_instance_crn' input." + } + validation { + condition = var.existing_secrets_manager_instance_crn == null && var.enable_secrets_manager_integration ? var.secrets_manager_service_plan != null : true + error_message = "A value for 'service_plan' is required if not providing a value for 'existing_secrets_manager_instance_crn'" + } +} + variable "skip_ocp_secrets_manager_iam_auth_policy" { type = bool description = "To skip creating auth policy that allows OCP cluster 'Manager' role access in the existing Secrets Manager instance for managing ingress certificates."