https://github.com/terraform-ibm-modules/terraform-ibm-sw-common-services
https://github.com/terraform-ibm-modules/terraform-ibm-sw-common-services
ibm-cloud terraform terraform-module
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/terraform-ibm-modules/terraform-ibm-sw-common-services
- Owner: terraform-ibm-modules
- License: apache-2.0
- Created: 2024-05-13T08:29:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-22T22:45:21.000Z (5 months ago)
- Last Synced: 2024-12-26T15:04:09.273Z (5 months ago)
- Topics: ibm-cloud, terraform, terraform-module
- Language: HCL
- Size: 66.4 KB
- Stars: 0
- Watchers: 14
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform cert-manager and licensing deployments
[-red)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[](https://github.com/terraform-ibm-modules/terraform-ibm-sw-common-services/releases/latest)
[](https://github.com/pre-commit/pre-commit)
[](https://renovatebot.com/)
[](https://github.com/semantic-release/semantic-release)This module deploys the `cert-manager` and `licensing` operators to a Kubernetes cluster
## Overview
* [terraform-ibm-sw-common-services](#terraform-ibm-sw-common-services)
* [Examples](./examples)
* [Basic example of using cert-manager and licensing](./examples/basic)
* [Contributing](#contributing)## terraform-ibm-sw-common-services
### Usage
```hcl
# ############################################################################
# Init cluster config for helm
# ############################################################################data "ibm_container_cluster_config" "cluster_config" {
# Update this value with the ID or name of the cluster where the operators will be deployed
cluster_name_id = "cluster_id"
}# ############################################################################
# Config providers
# ############################################################################provider "ibm" {
# Update this value with your IBM Cloud API key value
ibmcloud_api_key = "api key value" # pragma: allowlist secret
# Update this value with the region that your cluster is deployed
region = "us-south"
}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 cert-manager and licensing operators
# ############################################################################module "ibm_common_services_prereq" {
source = "terraform-ibm-modules/sw-common-services/ibm"
cluster_id = "cluster id" # Update this with the ID of the cluster where the operators will be deployed
cluster_resource_group_id = "resource group id" # Update this with the ID of your IBM Cloud resource group
}
```### Required IAM access policies
You need the following permissions to run this module.- IAM Services
- **Kubernetes** service
- `Viewer` platform access
- `Manager` service access### Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3.0 |
| [helm](#requirement\_helm) | >= 2.13.1, < 3.0.0 |
| [ibm](#requirement\_ibm) | >= 1.64.0, < 2.0.0 |### Modules
No modules.
### Resources
| Name | Type |
|------|------|
| [helm_release.ibm_cert_manager](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.ibm_licensing](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [ibm_container_cluster.cluster](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/container_cluster) | data source |
| [ibm_container_vpc_cluster.cluster](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/container_vpc_cluster) | data source |### Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [cert\_manager\_catalog](#input\_cert\_manager\_catalog) | The catalog name for cert manager | `string` | `"ibm-cert-manager-catalog"` | no |
| [cert\_manager\_catalog\_source\_image](#input\_cert\_manager\_catalog\_source\_image) | The catalog source image for cert manager | `string` | `"icr.io/cpopen/ibm-cert-manager-operator-catalog"` | no |
| [cert\_manager\_namespace](#input\_cert\_manager\_namespace) | The namespace for cert manager | `string` | `"ibm-cert-manager"` | no |
| [cert\_manager\_operator](#input\_cert\_manager\_operator) | The operator name for cert manager | `string` | `"ibm-cert-manager-operator"` | no |
| [cert\_manager\_operator\_group](#input\_cert\_manager\_operator\_group) | The operator group for cert manager | `string` | `"cert-manager-operatorgroup"` | no |
| [cert\_manager\_subscription\_channel](#input\_cert\_manager\_subscription\_channel) | The subscription channel for cert manager | `string` | `"v4.2"` | no |
| [cluster\_id](#input\_cluster\_id) | The ID of the cluster you wish to deploy the agents in | `string` | n/a | yes |
| [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The Resource Group ID of the cluster | `string` | n/a | yes |
| [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster for the observability agents is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | no |
| [licensing\_catalog](#input\_licensing\_catalog) | The catalog name for licensing | `string` | `"ibm-licensing-catalog"` | no |
| [licensing\_catalog\_source\_image](#input\_licensing\_catalog\_source\_image) | The catalog source image for licensing | `string` | `"icr.io/cpopen/ibm-licensing-catalog"` | no |
| [licensing\_namespace](#input\_licensing\_namespace) | The namespace for licensing | `string` | `"ibm-licensing"` | no |
| [licensing\_operator](#input\_licensing\_operator) | The operator name for licensing | `string` | `"ibm-licensing-operator-app"` | no |
| [licensing\_operator\_group](#input\_licensing\_operator\_group) | The operator group for licensing | `string` | `"licensing-operatorgroup"` | no |
| [licensing\_subscription\_channel](#input\_licensing\_subscription\_channel) | The subscription channel for licensing | `string` | `"v4.2"` | no |
| [openshift\_source](#input\_openshift\_source) | The openshift source for the subscriptions | `string` | `"openshift-marketplace"` | no |### Outputs
No outputs.
## Contributing
You can report issues and request features for this module in GitHub issues in the module repo. See [Report an issue or request a feature](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).
To set up your local development environment, see [Local development setup](https://terraform-ibm-modules.github.io/documentation/#/local-dev-setup) in the project documentation.