Skip to content

Commit

Permalink
feat: Removed deprecated overwrite argument
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Jun 16, 2023
1 parent da111af commit 661bbc6
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.78.0
rev: v1.81.0
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ No modules.
| <a name="input_ignore_value_changes"></a> [ignore\_value\_changes](#input\_ignore\_value\_changes) | Whether to create SSM Parameter and ignore changes in value | `bool` | `false` | no |
| <a name="input_key_id"></a> [key\_id](#input\_key\_id) | KMS key ID or ARN for encrypting a parameter (when type is SecureString) | `string` | `null` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of SSM parameter | `string` | `null` | no |
| <a name="input_overwrite"></a> [overwrite](#input\_overwrite) | Whether to allow overwrite an existing parameter | `string` | `null` | no |
| <a name="input_secure_type"></a> [secure\_type](#input\_secure\_type) | Whether the type of the value should be considered as secure or not? | `bool` | `false` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to resources | `map(string)` | `{}` | no |
| <a name="input_tier"></a> [tier](#input\_tier) | Parameter tier to assign to the parameter. If not specified, will use the default parameter tier for the region. Valid tiers are Standard, Advanced, and Intelligent-Tiering. Downgrading an Advanced tier parameter to Standard will recreate the resource. | `string` | `null` | no |
Expand All @@ -212,7 +211,7 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_insecure_value"></a> [insecure\_value](#output\_insecure\_value) | Insecure value of the parameter after jsondecode() |
| <a name="output_insecure_value"></a> [insecure\_value](#output\_insecure\_value) | Insecure value of the parameter |
| <a name="output_raw_value"></a> [raw\_value](#output\_raw\_value) | Raw value of the parameter (as it is stored in SSM). Use 'value' output to get jsondecode'd value |
| <a name="output_secure_type"></a> [secure\_type](#output\_secure\_type) | Whether SSM parameter is a SecureString or not? |
| <a name="output_secure_value"></a> [secure\_value](#output\_secure\_value) | Secure value of the parameter |
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ No inputs.

| Name | Description |
|------|-------------|
| <a name="output_insecure_value"></a> [insecure\_value](#output\_insecure\_value) | Insecure value of the parameter after jsondecode() |
| <a name="output_insecure_value"></a> [insecure\_value](#output\_insecure\_value) | Insecure value of the parameter |
| <a name="output_raw_value"></a> [raw\_value](#output\_raw\_value) | Raw value of the parameter (as it is stored in SSM). Use 'value' output to get jsondecode'd value |
| <a name="output_secure_type"></a> [secure\_type](#output\_secure\_type) | Whether SSM parameter is a SecureString or not? |
| <a name="output_secure_value"></a> [secure\_value](#output\_secure\_value) | Secure value of the parameter |
Expand Down
3 changes: 0 additions & 3 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ locals {
"string" = {
type = "String"
value = "string_value123"
overwrite = true
tier = "Intelligent-Tiering"
allowed_pattern = "[a-z0-9_]+"
}
Expand Down Expand Up @@ -125,7 +124,6 @@ module "multiple" {
secure_type = try(each.value.secure_type, null)
description = try(each.value.description, null)
tier = try(each.value.tier, null)
overwrite = try(each.value.overwrite, null)
key_id = try(each.value.key_id, null)
allowed_pattern = try(each.value.allowed_pattern, null)
data_type = try(each.value.data_type, null)
Expand All @@ -147,7 +145,6 @@ module "multiple_ignore_value_changes" {
secure_type = try(each.value.secure_type, null)
description = try(each.value.description, null)
tier = try(each.value.tier, null)
overwrite = try(each.value.overwrite, null)
key_id = try(each.value.key_id, null)
allowed_pattern = try(each.value.allowed_pattern, null)
data_type = try(each.value.data_type, null)
Expand Down
2 changes: 0 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ resource "aws_ssm_parameter" "this" {
insecure_value = local.list_type || local.string_type ? local.value : null

tier = var.tier
overwrite = var.overwrite
key_id = local.secure_type ? var.key_id : null
allowed_pattern = var.allowed_pattern
data_type = var.data_type
Expand All @@ -39,7 +38,6 @@ resource "aws_ssm_parameter" "ignore_value" {
insecure_value = local.list_type || local.string_type ? local.value : null

tier = var.tier
overwrite = var.overwrite
key_id = local.secure_type ? var.key_id : null
allowed_pattern = var.allowed_pattern
data_type = var.data_type
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ variable "tier" {
default = null
}

variable "overwrite" {
description = "Whether to allow overwrite an existing parameter"
type = string
default = null
}

variable "key_id" {
description = "KMS key ID or ARN for encrypting a parameter (when type is SecureString)"
type = string
Expand Down
1 change: 0 additions & 1 deletion wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "wrapper" {
description = try(each.value.description, var.defaults.description, null)
type = try(each.value.type, var.defaults.type, null)
tier = try(each.value.tier, var.defaults.tier, null)
overwrite = try(each.value.overwrite, var.defaults.overwrite, null)
key_id = try(each.value.key_id, var.defaults.key_id, null)
allowed_pattern = try(each.value.allowed_pattern, var.defaults.allowed_pattern, null)
data_type = try(each.value.data_type, var.defaults.data_type, null)
Expand Down

0 comments on commit 661bbc6

Please sign in to comment.