From 65bb28bee98e6ec118df2c0e230a29b7e37b22aa Mon Sep 17 00:00:00 2001 From: "Luis M. Gallardo D" Date: Tue, 28 Feb 2023 15:57:45 -0300 Subject: [PATCH 1/3] =?UTF-8?q?*=20Fix=20=C2=B4force=5Fdestroy=C2=B4=20att?= =?UTF-8?q?ribute=20ypo=20*=20Update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- main.tf | 10 +++++----- variables.tf | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 70483a4..fc2ec09 100644 --- a/README.md +++ b/README.md @@ -149,13 +149,13 @@ module "aws_backup_example" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.12.31 | -| [aws](#requirement\_aws) | >= 3.0 | +| [aws](#requirement\_aws) | >= 4.26 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 4.55.0 | +| [aws](#provider\_aws) | 4.56.0 | ## Modules @@ -214,6 +214,7 @@ No modules. | [selection\_tags](#input\_selection\_tags) | List of tags for `selection_name` var, when using variable definition. | `list(any)` | `[]` | no | | [selections](#input\_selections) | A list of selction maps | `any` | `[]` | no | | [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no | +| [vault\_force\_destroy](#input\_vault\_force\_destroy) | A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error. | `bool` | `false` | no | | [vault\_kms\_key\_arn](#input\_vault\_kms\_key\_arn) | The server-side encryption key that is used to protect your backups | `string` | `null` | no | | [vault\_name](#input\_vault\_name) | Name of the backup vault to create. If not given, AWS use default | `string` | `null` | no | | [windows\_vss\_backup](#input\_windows\_vss\_backup) | Enable Windows VSS backup option and create a VSS Windows backup | `bool` | `false` | no | diff --git a/main.tf b/main.tf index d363689..a471ac1 100644 --- a/main.tf +++ b/main.tf @@ -1,10 +1,10 @@ # AWS Backup vault resource "aws_backup_vault" "ab_vault" { - count = var.enabled && var.vault_name != null ? 1 : 0 - name = var.vault_name - kms_key_arn = var.vault_kms_key_arn - force_delete = var.vault_force_delete - tags = var.tags + count = var.enabled && var.vault_name != null ? 1 : 0 + name = var.vault_name + kms_key_arn = var.vault_kms_key_arn + force_destroy = var.vault_force_destroy + tags = var.tags } # AWS Backup vault lock configuration diff --git a/variables.tf b/variables.tf index 1f0e148..302dfb2 100644 --- a/variables.tf +++ b/variables.tf @@ -19,8 +19,8 @@ variable "tags" { default = {} } -variable "vault_force_delete" { - description = "Force delete the backup vault even if it contains recovery points" +variable "vault_force_destroy" { + description = "A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error." type = bool default = false } From 38749859b3a88ed597094aaf2749122becc599c3 Mon Sep 17 00:00:00 2001 From: "Luis M. Gallardo D" Date: Tue, 28 Feb 2023 16:02:06 -0300 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99d66eb..50f1acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.19.0 (February 28, 2022) + +ENHANCEMENTS: + +* Add support for ´force-destroy´ flag to backup vault (Thanks @igorzi84) +* Add new resource `aws_backup_vault_lock_configuration` (Thanks @dhoppe) + + ## 0.18.0 (September 30, 2022) ENHANCEMENTS: From a2ae3cd4441cfb5332ac9c5e51f1d2533551ea39 Mon Sep 17 00:00:00 2001 From: "Luis M. Gallardo D" Date: Tue, 28 Feb 2023 16:04:00 -0300 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50f1acc..80810fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ENHANCEMENTS: -* Add support for ´force-destroy´ flag to backup vault (Thanks @igorzi84) +* Add support for `force-destroy` flag to backup vault (Thanks @igorzi84) * Add new resource `aws_backup_vault_lock_configuration` (Thanks @dhoppe)