diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 395404e..21dcca6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.88.0 + rev: v1.92.2 hooks: - id: terraform_fmt - id: terraform_docs @@ -24,7 +24,7 @@ repos: - '--args=--only=terraform_unused_required_providers' - id: terraform_validate - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-merge-conflict - id: end-of-file-fixer diff --git a/main.tf b/main.tf index 4902d5f..d1ca1d6 100644 --- a/main.tf +++ b/main.tf @@ -53,6 +53,15 @@ resource "aws_batch_compute_environment" "this" { } } + dynamic "eks_configuration" { + for_each = try([each.value.eks_configuration], []) + + content { + eks_cluster_arn = eks_configuration.value.eks_cluster_arn + kubernetes_namespace = eks_configuration.value.kubernetes_namespace + } + } + # Prevent a race condition during environment deletion, otherwise the policy may be destroyed # too soon and the compute environment will then get stuck in the `DELETING` state depends_on = [aws_iam_role_policy_attachment.service]