From c6412dd340e26f32e91e4cc517d1e53ae3a6357f Mon Sep 17 00:00:00 2001 From: Abdul Wahid Date: Thu, 21 Sep 2023 17:33:48 +0100 Subject: [PATCH] chore: documentation (#6) --- CHANGELOG.md | 10 ++++++++-- README.md | 1 + main.tf | 6 ++++-- variables.tf | 6 ++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acd5bae..045e06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Add versions file for example + + + +## [3.0.0] - 2023-09-20 + +- Add versions file for example ([#5](https://github.com/marcincuber/terraform-aws-ssm-parameters/issues/5)) - Remove 'overwrite' + updates ([#4](https://github.com/marcincuber/terraform-aws-ssm-parameters/issues/4)) @@ -36,7 +41,8 @@ All notable changes to this project will be documented in this file. - Initial commit -[Unreleased]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/2.0.0...HEAD +[Unreleased]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/3.0.0...HEAD +[3.0.0]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/2.0.0...3.0.0 [2.0.0]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/1.0.2...2.0.0 [1.0.2]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/1.0.1...1.0.2 [1.0.1]: https://github.com/marcincuber/terraform-aws-ssm-parameters/compare/1.0.0...1.0.1 diff --git a/README.md b/README.md index 859aa87..eea339b 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ No modules. | [kms\_key\_id](#input\_kms\_key\_id) | The KMS key to use for encryption | `string` | `""` | no | | [name\_prefix](#input\_name\_prefix) | Path used for each SSM parameter created by the module | `string` | n/a | yes | | [parameters](#input\_parameters) | Non-encrypted parameters | `map(any)` | `{}` | no | +| [prevent\_overwrite](#input\_prevent\_overwrite) | [Deprecated - will be removed properly in 6.x] List of parameter names to prevent overwrite for | `list(string)` | `[]` | no | | [secure\_parameters](#input\_secure\_parameters) | Secure parameters | `map(any)` | `{}` | no | | [tags](#input\_tags) | n/a | `map(any)` | `{}` | no | diff --git a/main.tf b/main.tf index e70ad0a..8772eb1 100644 --- a/main.tf +++ b/main.tf @@ -5,7 +5,8 @@ resource "aws_ssm_parameter" "parameters" { type = "String" value = each.value - tier = contains(var.advanced_tier, each.key) ? "Advanced" : "Standard" + tier = contains(var.advanced_tier, each.key) ? "Advanced" : "Standard" + overwrite = contains(var.prevent_overwrite, each.key) ? false : true tags = var.tags } @@ -18,7 +19,8 @@ resource "aws_ssm_parameter" "secure_parameters" { value = each.value key_id = var.kms_key_id != "" ? var.kms_key_id : null - tier = contains(var.advanced_tier, each.key) ? "Advanced" : "Standard" + tier = contains(var.advanced_tier, each.key) ? "Advanced" : "Standard" + overwrite = contains(var.prevent_overwrite, each.key) ? false : true tags = var.tags } diff --git a/variables.tf b/variables.tf index da59f1f..b4f9b51 100644 --- a/variables.tf +++ b/variables.tf @@ -31,3 +31,9 @@ variable "advanced_tier" { type = list(string) default = [] } + +variable "prevent_overwrite" { + description = "[Deprecated - will be removed properly in 6.x] List of parameter names to prevent overwrite for" + type = list(string) + default = [] +} \ No newline at end of file