Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
fixing dependes on (#14)
Browse files Browse the repository at this point in the history
* fixing dependes on

* Apply suggestions from code review

Co-authored-by: Charles Bushong <bushong1@gmail.com>

---------

Co-authored-by: Charles Bushong <bushong1@gmail.com>
  • Loading branch information
AustinAbro321 and bushong1 authored Sep 12, 2023
1 parent 1b6f9e0 commit 75ae1b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,18 @@ data "aws_iam_policy_document" "vault_policy" {
}
}

# Adding this because a bug in the provider is causing implicit dependencies to not be enough
# Explict dependencies also don't work
# See https://github.com/hashicorp/terraform-provider-aws/issues/33173
# Once this bug if fixed we can delete both this resource block along with the depends_on on the vault policy below
resource "time_sleep" "iam_delay" {
depends_on = [ aws_iam_role.efs_backup_restore_role ]

create_duration = "20s"
}

resource "aws_backup_vault_policy" "efs_backup_vault" {
depends_on = [ time_sleep.iam_delay ]
backup_vault_name = aws_backup_vault.daily.name
policy = data.aws_iam_policy_document.vault_policy.json
}
Expand Down

0 comments on commit 75ae1b2

Please sign in to comment.