Skip to content

Commit

Permalink
IA-3628: Adding boolean backup_bucket so the state bucket can be back…
Browse files Browse the repository at this point in the history
…ed up by the AWS Backup Vault
  • Loading branch information
yaythecloud committed Feb 27, 2024
1 parent 221c276 commit 4cd0c95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ resource "aws_s3_bucket" "bucket" {

bucket = var.bucket_name
tags = merge(var.tags, {
Name = "Terraform S3 Backend State Store",
Name = "Terraform S3 Backend State Store",
BackupDaily = var.backup_bucket
BackupWeekly = var.backup_bucket
BackupQuarterly = var.backup_bucket
})
}

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variable "backup_bucket" {
type = bool
description = "Optional; Set to true to enable backups by the AWS Backup Vault service."
default = false
}
variable "bucket_name" {
type = string
description = "Required; The bucket name in which terraform state files will be stored."
Expand Down

0 comments on commit 4cd0c95

Please sign in to comment.