Skip to content

Commit 614fc14

Browse files
authored
fix: Add create_before_destroy lifecycle hook to aws_batch_compute_environment (#18)
* Add lifecycle to aws_batch_compute_environment * terraform fmt Signed-off-by: Kevin <kevin@stealsyour.pw> --------- Signed-off-by: Kevin <kevin@stealsyour.pw>
1 parent 3484a97 commit 614fc14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ resource "aws_batch_compute_environment" "this" {
5757
# too soon and the compute environment will then get stuck in the `DELETING` state
5858
depends_on = [aws_iam_role_policy_attachment.service]
5959

60+
lifecycle {
61+
create_before_destroy = true
62+
}
63+
6064
tags = merge(var.tags, lookup(each.value, "tags", {}))
6165
}
6266

0 commit comments

Comments
 (0)