Skip to content

Commit

Permalink
feat: update the provider versions and add set_list attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
uchinda-sph committed Oct 9, 2024
1 parent 067aa26 commit 7012a1c
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,51 @@ Helm release module can be used to provision a generic Helm Chart as an Add-On f
| <a name="output_helm_release"></a> [helm\_release](#output\_helm\_release) | Map of attributes of the Helm release created without sensitive outputs |
| <a name="output_release_metadata"></a> [release\_metadata](#output\_release\_metadata) | Map of attributes of the Helm release metadata |
<!-- END_TF_DOCS -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.15.0 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.32.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.15.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 2.32.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_irsa_role"></a> [irsa\_role](#module\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.5.0 |

## Resources

| Name | Type |
|------|------|
| [helm_release.this](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubernetes_namespace.irsa](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
| [kubernetes_service_account.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_helm_config"></a> [helm\_config](#input\_helm\_config) | Helm chart config. Repository and version required. See https://registry.terraform.io/providers/hashicorp/helm/latest/docs | `any` | n/a | yes |
| <a name="input_irsa_config"></a> [irsa\_config](#input\_irsa\_config) | Input configuration for IRSA module | <pre>object({<br> role_name = optional(string, "")<br> role_policy_arns = optional(map(string), {})<br> create_kubernetes_namespace = optional(bool, false)<br> create_kubernetes_service_account = optional(bool, false)<br> kubernetes_namespace = optional(string, "")<br> kubernetes_service_account = optional(string, "")<br> oidc_providers = optional(any, null)<br> })</pre> | `{}` | no |
| <a name="input_set_list_values"></a> [set\_list\_values](#input\_set\_list\_values) | Forced set\_list values | `any` | `[]` | no |
| <a name="input_set_sensitive_values"></a> [set\_sensitive\_values](#input\_set\_sensitive\_values) | Forced set\_sensitive values | `any` | `[]` | no |
| <a name="input_set_values"></a> [set\_values](#input\_set\_values) | Forced set values | `any` | `[]` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add the the IAM role | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_helm_release"></a> [helm\_release](#output\_helm\_release) | Map of attributes of the Helm release created without sensitive outputs |
| <a name="output_release_metadata"></a> [release\_metadata](#output\_release\_metadata) | Map of attributes of the Helm release metadata |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ resource "helm_release" "this" {
}
}

dynamic "set_list" {
iterator = each_item
for_each = try(var.helm_config.set_list, null) != null ? concat(var.helm_config.set_list, var.set_list_values) : var.set_list_values

content {
name = each_item.value.name
value = each_item.value.value
}
}

postrender {
binary_path = try(var.helm_config.postrender, "")
}
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ variable "set_sensitive_values" {
default = []
}

variable "set_list_values" {
description = "Forced set_list values"
type = any
default = []
}
#######
# IRSA
#######
Expand Down
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ terraform {
required_providers {
helm = {
source = "hashicorp/helm"
version = ">= 2.7.1"
version = ">= 2.15.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.15.0"
version = ">= 2.32.0"
}
}
}

0 comments on commit 7012a1c

Please sign in to comment.