Skip to content

iits-consulting/terraform-opentelekomcloud-crd-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ IMPORTANT NOTICE

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.

Custom Resource Definition Installer

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
      }]
    }
  }
}

Requirements

Name Version
terraform >= 1.5.7
helm ~> 2.17
kubectl ~> 1.19

Providers

Name Version
helm ~> 2.17
kubectl ~> 1.19

Modules

No modules.

Resources

Name Type
kubectl_manifest.crds resource
helm_template.charts data source
kubectl_file_documents.manifests data source
kubectl_server_version.current data source

Inputs

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({
repository = string
version = string
enabled = optional(bool, true)
values = optional(list(string), [""])
set = optional(list(object({
name = string
value = optional(string)
type = optional(string)
})), [])
set_list = optional(list(object({
name = string
value = list(string)
})), [])
set_sensitive = optional(list(object({
name = string
value = string
type = optional(string)
})), [])
}))
{} 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)
[
"apiVersion",
"kind",
"metadata",
"spec"
]
no
server_side_apply Apply using server-side-apply method. bool true no

Outputs

No outputs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages