Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ repos:
- id: terraform_fmt
- id: terraform_docs
args:
- '--args=--lockfile=false'
- "--args=--lockfile=false"
- id: terraform_tflint
args:
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- "--args=--only=terraform_deprecated_interpolation"
- "--args=--only=terraform_deprecated_index"
- "--args=--only=terraform_unused_declarations"
- "--args=--only=terraform_comment_syntax"
- "--args=--only=terraform_documented_outputs"
- "--args=--only=terraform_documented_variables"
- "--args=--only=terraform_typed_variables"
- "--args=--only=terraform_module_pinned_source"
- "--args=--only=terraform_naming_convention"
- "--args=--only=terraform_required_version"
- "--args=--only=terraform_required_providers"
- "--args=--only=terraform_standard_module_structure"
- "--args=--only=terraform_workspace_remote"
- id: terraform_validate
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down
9 changes: 5 additions & 4 deletions examples/eks-auto-mode/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ module "eks" {
name = local.name
kubernetes_version = local.kubernetes_version
endpoint_public_access = true
deletion_protection = true
deletion_protection = false

enable_cluster_creator_admin_permissions = true

compute_config = {
enabled = true
node_pools = ["general-purpose"]
node_pools = []
}

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
create_node_iam_role = true
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

tags = local.tags
}
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "aws_eks_cluster" "this" {
content {
enabled = compute_config.value.enabled
node_pools = compute_config.value.node_pools
node_role_arn = compute_config.value.node_pools != null ? try(aws_iam_role.eks_auto[0].arn, compute_config.value.node_role_arn) : null
node_role_arn = compute_config.value.node_pools != null && length(try(compute_config.value.node_pools, [])) > 0 ? try(aws_iam_role.eks_auto[0].arn, compute_config.value.node_role_arn) : null
}
}

Expand Down