From 346acca7fd27153e6648f67ffbd33e037cc04950 Mon Sep 17 00:00:00 2001 From: xpk Date: Tue, 6 Sep 2022 11:41:06 +0800 Subject: [PATCH] NEW: aws backup --- modules/storage/aws-backup/awsbackup.tf | 117 ++++++++++++++++++++++++ modules/storage/aws-backup/kms-key.tf | 67 ++++++++++++++ modules/storage/aws-backup/variables.tf | 9 ++ 3 files changed, 193 insertions(+) create mode 100644 modules/storage/aws-backup/awsbackup.tf create mode 100644 modules/storage/aws-backup/kms-key.tf create mode 100644 modules/storage/aws-backup/variables.tf diff --git a/modules/storage/aws-backup/awsbackup.tf b/modules/storage/aws-backup/awsbackup.tf new file mode 100644 index 0000000..3a41769 --- /dev/null +++ b/modules/storage/aws-backup/awsbackup.tf @@ -0,0 +1,117 @@ +resource "aws_backup_vault" "ab-vault" { + name = "BackupVault" + kms_key_arn = aws_kms_key.ab-kms-key.arn + tags = var.default-tags +} + +resource "aws_backup_vault_policy" "ab-vault-policy" { + backup_vault_name = aws_backup_vault.ab-vault.name + policy = <