Skip to content

Commit b6aa7e1

Browse files
galloisbryantbiggs
andauthored
feat: Add support for eks_configuration (#32)
* Add eks_configuration to compute_environment * Fix formatting To adhere to suggestions in https://github.com/terraform-aws-modules/terraform-aws-batch/actions/runs/10355161421/job/28731253912?pr=32 * chore: Update conditional logic --------- Co-authored-by: Bryant Biggs <[email protected]>
1 parent 0ec188f commit b6aa7e1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.88.0
3+
rev: v1.92.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs
@@ -24,7 +24,7 @@ repos:
2424
- '--args=--only=terraform_unused_required_providers'
2525
- id: terraform_validate
2626
- repo: https://github.com/pre-commit/pre-commit-hooks
27-
rev: v4.5.0
27+
rev: v4.6.0
2828
hooks:
2929
- id: check-merge-conflict
3030
- id: end-of-file-fixer

main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ resource "aws_batch_compute_environment" "this" {
5353
}
5454
}
5555

56+
dynamic "eks_configuration" {
57+
for_each = try([each.value.eks_configuration], [])
58+
59+
content {
60+
eks_cluster_arn = eks_configuration.value.eks_cluster_arn
61+
kubernetes_namespace = eks_configuration.value.kubernetes_namespace
62+
}
63+
}
64+
5665
# Prevent a race condition during environment deletion, otherwise the policy may be destroyed
5766
# too soon and the compute environment will then get stuck in the `DELETING` state
5867
depends_on = [aws_iam_role_policy_attachment.service]

0 commit comments

Comments
 (0)