Skip to content

Commit

Permalink
fix: Remove optional variable attribute experiment from helm_addon
Browse files Browse the repository at this point in the history
…sub-module
  • Loading branch information
bryantbiggs committed Sep 30, 2022
1 parent 632a698 commit 4811f02
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion modules/kubernetes-addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0, < 1.3.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.72 |

## Providers
Expand Down
4 changes: 2 additions & 2 deletions modules/kubernetes-addons/helm-addon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Helm Addon module can be used to provision a generic Helm Chart as an Add-On for

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_addon_context"></a> [addon\_context](#input\_addon\_context) | Input configuration for the addon | <pre>object({<br> aws_caller_identity_account_id = string<br> aws_caller_identity_arn = string<br> aws_eks_cluster_endpoint = string<br> aws_partition_id = string<br> aws_region_name = string<br> eks_cluster_id = string<br> eks_oidc_issuer_url = string<br> eks_oidc_provider_arn = string<br> tags = map(string)<br> irsa_iam_role_path = optional(string)<br> irsa_iam_permissions_boundary = optional(string)<br> })</pre> | n/a | yes |
| <a name="input_addon_context"></a> [addon\_context](#input\_addon\_context) | Input configuration for the addon | `any` | n/a | yes |
| <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> kubernetes_namespace = string<br> create_kubernetes_namespace = optional(bool)<br> kubernetes_service_account = string<br> create_kubernetes_service_account = optional(bool)<br> kubernetes_svc_image_pull_secrets = optional(list(string))<br> irsa_iam_policies = optional(list(string))<br> })</pre> | `null` | no |
| <a name="input_irsa_config"></a> [irsa\_config](#input\_irsa\_config) | Input configuration for IRSA module | `any` | `{}` | no |
| <a name="input_irsa_iam_role_name"></a> [irsa\_iam\_role\_name](#input\_irsa\_iam\_role\_name) | IAM role name for IRSA | `string` | `""` | no |
| <a name="input_manage_via_gitops"></a> [manage\_via\_gitops](#input\_manage\_via\_gitops) | Determines if the add-on should be managed via GitOps | `bool` | `false` | no |
| <a name="input_set_sensitive_values"></a> [set\_sensitive\_values](#input\_set\_sensitive\_values) | Forced set\_sensitive values | `any` | `[]` | no |
Expand Down
8 changes: 4 additions & 4 deletions modules/kubernetes-addons/helm-addon/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ module "irsa" {
create_kubernetes_service_account = try(var.irsa_config.create_kubernetes_service_account, true)
kubernetes_namespace = var.irsa_config.kubernetes_namespace
kubernetes_service_account = var.irsa_config.kubernetes_service_account
kubernetes_svc_image_pull_secrets = var.irsa_config.kubernetes_svc_image_pull_secrets
irsa_iam_policies = var.irsa_config.irsa_iam_policies
kubernetes_svc_image_pull_secrets = try(var.irsa_config.kubernetes_svc_image_pull_secrets, null)
irsa_iam_policies = lookup(var.irsa_config, "irsa_iam_policies", null)
irsa_iam_role_name = var.irsa_iam_role_name
irsa_iam_role_path = var.addon_context.irsa_iam_role_path
irsa_iam_permissions_boundary = var.addon_context.irsa_iam_permissions_boundary
irsa_iam_role_path = lookup(var.addon_context, "irsa_iam_role_path", null)
irsa_iam_permissions_boundary = lookup(var.addon_context, "irsa_iam_permissions_boundary", null)
eks_cluster_id = var.addon_context.eks_cluster_id
eks_oidc_provider_arn = var.addon_context.eks_oidc_provider_arn
}
48 changes: 25 additions & 23 deletions modules/kubernetes-addons/helm-addon/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,39 @@ variable "manage_via_gitops" {
}

variable "irsa_iam_role_name" {
type = string
description = "IAM role name for IRSA"
type = string
default = ""
}

variable "irsa_config" {
description = "Input configuration for IRSA module"
type = object({
kubernetes_namespace = string
create_kubernetes_namespace = optional(bool)
kubernetes_service_account = string
create_kubernetes_service_account = optional(bool)
kubernetes_svc_image_pull_secrets = optional(list(string))
irsa_iam_policies = optional(list(string))
})
default = null
type = any
default = {}
# type = object({
# kubernetes_namespace = string
# create_kubernetes_namespace = optional(bool)
# kubernetes_service_account = string
# create_kubernetes_service_account = optional(bool)
# kubernetes_svc_image_pull_secrets = optional(list(string))
# irsa_iam_policies = optional(list(string))
# })
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
aws_caller_identity_account_id = string
aws_caller_identity_arn = string
aws_eks_cluster_endpoint = string
aws_partition_id = string
aws_region_name = string
eks_cluster_id = string
eks_oidc_issuer_url = string
eks_oidc_provider_arn = string
tags = map(string)
irsa_iam_role_path = optional(string)
irsa_iam_permissions_boundary = optional(string)
})
type = any
# type = object({
# aws_caller_identity_account_id = string
# aws_caller_identity_arn = string
# aws_eks_cluster_endpoint = string
# aws_partition_id = string
# aws_region_name = string
# eks_cluster_id = string
# eks_oidc_issuer_url = string
# eks_oidc_provider_arn = string
# tags = map(string)
# irsa_iam_role_path = optional(string)
# irsa_iam_permissions_boundary = optional(string)
# })
}
2 changes: 0 additions & 2 deletions modules/kubernetes-addons/helm-addon/versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
terraform {
required_version = ">= 1.0.0"

experiments = [module_variable_optional_attrs]

required_providers {
helm = {
source = "hashicorp/helm"
Expand Down
2 changes: 1 addition & 1 deletion modules/kubernetes-addons/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0.0, < 1.3.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
Expand Down

0 comments on commit 4811f02

Please sign in to comment.