Skip to content

Commit

Permalink
added comments on backup module
Browse files Browse the repository at this point in the history
  • Loading branch information
deshmukhvidya committed Dec 19, 2024
1 parent 4960518 commit d584859
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/aws_backup/iam_role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data "aws_iam_policy_document" "assume_role" {
}
}

#### IAM rle for backup ####
resource "aws_iam_role" "backup_operator_role" {
name = "${var.prefix}-${var.location}-${var.hub_environment}-backup-operator-role"
assume_role_policy = data.aws_iam_policy_document.assume_role.json
Expand Down
6 changes: 4 additions & 2 deletions modules/aws_backup/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


### backup valut creation ###
resource "aws_backup_vault" "spoke" {
name = "ng-${var.spoke_account_id}-backup-vault"
kms_key_arn = aws_kms_key.spoke_vault_key.arn
Expand All @@ -20,6 +20,8 @@ resource "aws_backup_vault_lock_configuration" "spoke" {
depends_on = [aws_backup_vault.spoke]
}


### Vault policy and controls ###
resource "aws_backup_vault_policy" "spoke" {
backup_vault_name = aws_backup_vault.spoke.name
depends_on = [aws_backup_vault.spoke, aws_iam_role.restore_operator_role, aws_iam_role.backup_operator_role]
Expand Down Expand Up @@ -89,7 +91,7 @@ EOF
data "aws_caller_identity" "current" {}



### Backup framework ###
resource "aws_backup_framework" "backup_compliance_framework" {
depends_on = [ aws_backup_vault.spoke ]
name = "ng_backup_framework"
Expand Down

0 comments on commit d584859

Please sign in to comment.