diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7bc5f23..9c415ae 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=500']
@@ -17,7 +17,7 @@ repos:
args: ['--allow-missing-credentials']
- id: trailing-whitespace
- repo: https://github.com/antonbabenko/pre-commit-terraform
- rev: v1.81.0
+ rev: v1.83.5
hooks:
- id: terraform_fmt
- id: terraform_docs
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 765ea50..190a7a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
-- Upgraded to 5.x compatibility + Added square brackets to list items requirement
+
+
+
+## [2.1.0] - 2023-07-26
+
+- Upgraded to 5.x compatibility + Added square brackets to list items r… ([#6](https://github.com/umotif-public/terraform-aws-kms/issues/6))
@@ -43,7 +48,8 @@ All notable changes to this project will be documented in this file.
- Initial commit
-[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/2.0.0...HEAD
+[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/2.1.0...HEAD
+[2.1.0]: https://github.com/umotif-public/terraform-aws-kms/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.3...2.0.0
[1.0.3]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.1...1.0.2
diff --git a/README.md b/README.md
index 7c6d8bf..36f2b7d 100644
--- a/README.md
+++ b/README.md
@@ -46,13 +46,13 @@ Module managed by [uMotif](https://github.com/umotif-public/).
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.11 |
-| [aws](#requirement\_aws) | >= 3.53.0 |
+| [aws](#requirement\_aws) | >= 3.64.0 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 3.53.0 |
+| [aws](#provider\_aws) | >= 3.64.0 |
## Modules
@@ -78,6 +78,7 @@ No modules.
| [enabled](#input\_enabled) | Specifies whether to create resources within this module. | `bool` | `true` | no |
| [is\_enabled](#input\_is\_enabled) | Specifies whether the key is enabled. | `bool` | `true` | no |
| [key\_usage](#input\_key\_usage) | Specifies the intended use of the key. Defaults to ENCRYPT\_DECRYPT, and only symmetric encryption and decryption are supported. | `string` | `"ENCRYPT_DECRYPT"` | no |
+| [multi\_region](#input\_multi\_region) | Indicates whether the KMS key is a multi-Region (true) or regional (false) key. Defaults to false | `bool` | `false` | no |
| [policy](#input\_policy) | A valid policy JSON document. For more information about building AWS IAM policy documents with Terraform. | `string` | `""` | no |
| [tags](#input\_tags) | Mapping of additional tags. | `map(string)` | `{}` | no |
diff --git a/examples/core/.terraform.lock.hcl b/examples/core/.terraform.lock.hcl
index 58a6de9..592b490 100644
--- a/examples/core/.terraform.lock.hcl
+++ b/examples/core/.terraform.lock.hcl
@@ -2,24 +2,20 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/aws" {
- version = "5.9.0"
- constraints = ">= 3.53.0, ~> 5.0"
+ version = "3.64.0"
+ constraints = ">= 3.64.0, 3.64.0"
hashes = [
- "h1:f3SxpLlSueYKYXz5zpzP90MUN3cJ+omnTHXV9vUtOvM=",
- "zh:032424d4686ce2ff7c5a4a738491635616afbf6e06b3e7e6a754baa031d1265d",
- "zh:1e530b4020544ec94e1fe7b1e4296640eb12cf1bf4f79cd6429ff2c4e6fffaf3",
- "zh:24d2eee57a4c78039959dd9bb6dff2b75ed0483d44929550c067c3488307dc62",
- "zh:3ad6d736722059664e790a358eacf0e0e60973ec44e70142fb503275de2116c1",
- "zh:3f34d81acf86c61ddd271e9c4b8215765037463c3fe3c7aea1dc32a509020cfb",
- "zh:65a04aa615fc320059a0871702c83b6be10bce2064056096b46faffe768a698e",
- "zh:7fb56c3ce1fe77983627e2931e7c7b73152180c4dfb03e793413d0137c85d6b2",
- "zh:90c94cb9d7352468bcd5ba21a56099fe087a072b1936d86f47d54c2a012b708a",
- "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425",
- "zh:a109c5f01ed48852fe17847fa8a116dfdb81500794a9cf7e5ef92ea6dec20431",
- "zh:a27c5396077a36ac2801d4c1c1132201a9225a65bba0e3b3aded9cc18f2c38ff",
- "zh:a86ad796ccb0f2cb8f0ca069c774dbf74964edd3282529726816c72e22164b3c",
- "zh:bda8afc64091a2a72e0cc38fde937b2163b1b072a5c41310d255901207571afd",
- "zh:d22473894cd7e94b7a971793dd07309569f82913a10e4bd6c22e04f362f03bb9",
- "zh:f4dbb6d13511290a5274f5b202e6d9997643f86e4c48e8c5e3c204121082851a",
+ "h1:SIyCcDYMwX3UDB/HCTXAsRE1ZPEI1+wnR9ur9l+1VDg=",
+ "zh:2538efea7190e87ef78c644b53673aa6c8a6dd641f0e8ba98ad6c0b7f11fe17c",
+ "zh:397b80d52a8a8ac6b4d2b6848e26c87298789aba8f5d4458ffa855553956f3ec",
+ "zh:572987afda6190fc56fce0c327960e163850a1ed2cdc8b3f0a28d131d647a30b",
+ "zh:78ff10f69f6410a665e28550f4728b94c323b48894ee19c4443fe77f7dcc6bc3",
+ "zh:8da9d1dc247cadc5bf334735286462eb8355ce9a218238734dbad6c0e19dd70d",
+ "zh:8ef547145b504c11d30bd7e3cfa37bf688fe3a8f0fd791883c2e1d6dc2398469",
+ "zh:9a8d84ddc25e9652e5c5f4827447eec6d039a70a26d35a7b044979b6fc31f600",
+ "zh:9f487b220897b1dcef3d67db37129447fe2975de132d74b9fed0042e8528af59",
+ "zh:c23cd3976cb7e6e49c0d0675f503c36aa5b941037155c7c8b6e33462863da41e",
+ "zh:ddf99c227c2a0e207b61441fa4f603920a741d75a2de884de512e94344e3c2e9",
+ "zh:f8b8421971b798740410cbea11ffe7b7d685a1b0848208abc0fb59fcc933b42a",
]
}
diff --git a/examples/core/main.tf b/examples/core/main.tf
index 2f227ad..ffb38f5 100644
--- a/examples/core/main.tf
+++ b/examples/core/main.tf
@@ -7,6 +7,7 @@ module "kms" {
alias_name = "test-key"
deletion_window_in_days = 7
enable_key_rotation = true
+ multi_region = true
tags = {
Environment = "dev"
diff --git a/examples/core/versions.tf b/examples/core/versions.tf
index f9c7d3d..b24fdc0 100644
--- a/examples/core/versions.tf
+++ b/examples/core/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 5"
+ version = "3.64.0"
}
}
}
diff --git a/main.tf b/main.tf
index cd29bc2..019cebe 100644
--- a/main.tf
+++ b/main.tf
@@ -9,7 +9,9 @@ resource "aws_kms_key" "main" {
is_enabled = var.is_enabled
enable_key_rotation = var.enable_key_rotation
policy = var.policy != "" ? var.policy : null
+ multi_region = var.multi_region
tags = var.tags
+
}
resource "aws_kms_alias" "main" {
diff --git a/variables.tf b/variables.tf
index c96aa5a..9bea645 100644
--- a/variables.tf
+++ b/variables.tf
@@ -62,3 +62,9 @@ variable "bypass_policy_lockout_safety_check" {
default = false
description = "Specifies whether to disable the policy lockout check performed when creating or updating the key's policy."
}
+
+variable "multi_region" {
+ type = bool
+ default = false
+ description = "Indicates whether the KMS key is a multi-Region (true) or regional (false) key. Defaults to false"
+}
diff --git a/versions.tf b/versions.tf
index fac3bdc..0196a01 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 3.53.0"
+ version = ">= 3.64.0"
}
}
}
\ No newline at end of file