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

Commit

Permalink
backup policy name change (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinAbro321 authored Sep 15, 2023
1 parent 75ae1b2 commit fefb74f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ data "aws_iam_policy_document" "vault_policy" {
# 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 ]

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 ]
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 Expand Up @@ -141,7 +140,7 @@ data "aws_iam_policy_document" "backup_efs_policy" {
}

resource "aws_iam_policy" "efs_kms_backup_restore" {
name = var.backup_restore_policy_name
name = "${var.cluster_name}-${var.backup_restore_policy_name}"
description = "Policy for EFS backup and restore with KMS encryption"
path = var.iam_path

Expand Down

0 comments on commit fefb74f

Please sign in to comment.