Skip to content

Commit

Permalink
fix: Add create_before_destroy lifecycle hook to `aws_batch_compute…
Browse files Browse the repository at this point in the history
…_environment` (#18)

* Add lifecycle to aws_batch_compute_environment

* terraform fmt

Signed-off-by: Kevin <[email protected]>

---------

Signed-off-by: Kevin <[email protected]>
  • Loading branch information
thatarchguy authored Apr 27, 2023
1 parent 3484a97 commit 614fc14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ resource "aws_batch_compute_environment" "this" {
# too soon and the compute environment will then get stuck in the `DELETING` state
depends_on = [aws_iam_role_policy_attachment.service]

lifecycle {
create_before_destroy = true
}

tags = merge(var.tags, lookup(each.value, "tags", {}))
}

Expand Down

0 comments on commit 614fc14

Please sign in to comment.