Effective July 11th, 2025, this repository will be moved to terraform-kubernetes-crd-installer and no longer maintained. In order to continue receiving the latest updates and support, please transition to using our new repository.
A module designed to automatically extract the crds from Helm charts and install them on the target kubernetes cluster. The module can be used with existing CRDs without importing.
WARNING: This module will have a large footprint on the terraform state depending on the size and number of charts.
Module execution and subsequent state generation can take a longer than usual time due to the large size of the state the module generates.
It is recommended to use it as standalone in its own script to separate its state from other terraform scripts.
Usage example (overriding versions and disabling built-in default charts):
module "crds" {
source = "iits-consulting/crd-installer/opentelekomcloud/"
default_chart_overrides = {
cert-manager = {
version = "1.16.1"
}
traefik = {
version = "32.1.1"
}
kyverno = {
enabled = false
}
prometheus-stack = {
version = "62.6.0"
}
}
}Usage example (adding new charts for crd installation):
module "crds" {
source = "iits-consulting/crd-installer/opentelekomcloud/"
charts = {
exampleChart1 = {
repository = "https://charts.iits.tech"
version = "0.0.1"
set = [{
name = "exampleChart1.installCRDs"
value = true
}]
}
exampleChart2 = {
repository = "https://charts.iits.tech"
version = "0.0.2"
set = [{
name = "exampleChart2.crds.install"
value = true
}]
}
}
}| Name | Version |
|---|---|
| terraform | >= 1.5.7 |
| helm | ~> 2.17 |
| kubectl | ~> 1.19 |
| Name | Version |
|---|---|
| helm | ~> 2.17 |
| kubectl | ~> 1.19 |
No modules.
| Name | Type |
|---|---|
| kubectl_manifest.crds | resource |
| helm_template.charts | data source |
| kubectl_file_documents.manifests | data source |
| kubectl_server_version.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| apply_only | Apply only, prevents destruction of CRDs. | bool |
true |
no |
| charts | A map of additional charts and their parameters to extract CRDs from. (Please ensure that the CRD flags are set to true for the charts) | map(object({ |
{} |
no |
| default_chart_overrides | Overrides for the default charts. Supported parameters are: repository, version, enabled, values, set and set_sensitive. (see https://registry.terraform.io/providers/hashicorp/helm/latest/docs/data-sources/template) | map(any) |
{} |
no |
| force_conflicts | Apply using force-conflicts flag. | bool |
true |
no |
| force_new | Forces delete & create of resources if the CRD manifest changes. | bool |
false |
no |
| hide_fields | Hide the diff output of terraform by marking it as sensitive. Useful for less cluttered terraform output. See https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/kubectl_manifest#sensitive-fields for details. | list(string) |
[ |
no |
| server_side_apply | Apply using server-side-apply method. | bool |
true |
no |
No outputs.