Skip to content

Commit 042f7f6

Browse files
Added multi-region feature + set minimum provider to 3.64 (#7)
1 parent 8408c6c commit 042f7f6

File tree

9 files changed

+38
-26
lines changed

9 files changed

+38
-26
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=500']
@@ -17,7 +17,7 @@ repos:
1717
args: ['--allow-missing-credentials']
1818
- id: trailing-whitespace
1919
- repo: https://github.com/antonbabenko/pre-commit-terraform
20-
rev: v1.81.0
20+
rev: v1.83.5
2121
hooks:
2222
- id: terraform_fmt
2323
- id: terraform_docs

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8-
- Upgraded to 5.x compatibility + Added square brackets to list items requirement
8+
9+
10+
<a name="2.1.0"></a>
11+
## [2.1.0] - 2023-07-26
12+
13+
- Upgraded to 5.x compatibility + Added square brackets to list items r… ([#6](https://github.com/umotif-public/terraform-aws-kms/issues/6))
914

1015

1116
<a name="2.0.0"></a>
@@ -43,7 +48,8 @@ All notable changes to this project will be documented in this file.
4348
- Initial commit
4449

4550

46-
[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/2.0.0...HEAD
51+
[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/2.1.0...HEAD
52+
[2.1.0]: https://github.com/umotif-public/terraform-aws-kms/compare/2.0.0...2.1.0
4753
[2.0.0]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.3...2.0.0
4854
[1.0.3]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.2...1.0.3
4955
[1.0.2]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.1...1.0.2

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ Module managed by [uMotif](https://github.com/umotif-public/).
4646
| Name | Version |
4747
|------|---------|
4848
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.11 |
49-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.53.0 |
49+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.64.0 |
5050

5151
## Providers
5252

5353
| Name | Version |
5454
|------|---------|
55-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.53.0 |
55+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.64.0 |
5656

5757
## Modules
5858

@@ -78,6 +78,7 @@ No modules.
7878
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Specifies whether to create resources within this module. | `bool` | `true` | no |
7979
| <a name="input_is_enabled"></a> [is\_enabled](#input\_is\_enabled) | Specifies whether the key is enabled. | `bool` | `true` | no |
8080
| <a name="input_key_usage"></a> [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 |
81+
| <a name="input_multi_region"></a> [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 |
8182
| <a name="input_policy"></a> [policy](#input\_policy) | A valid policy JSON document. For more information about building AWS IAM policy documents with Terraform. | `string` | `""` | no |
8283
| <a name="input_tags"></a> [tags](#input\_tags) | Mapping of additional tags. | `map(string)` | `{}` | no |
8384

examples/core/.terraform.lock.hcl

Lines changed: 14 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/core/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module "kms" {
77
alias_name = "test-key"
88
deletion_window_in_days = 7
99
enable_key_rotation = true
10+
multi_region = true
1011

1112
tags = {
1213
Environment = "dev"

examples/core/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = "~> 5"
7+
version = "3.64.0"
88
}
99
}
1010
}

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ resource "aws_kms_key" "main" {
99
is_enabled = var.is_enabled
1010
enable_key_rotation = var.enable_key_rotation
1111
policy = var.policy != "" ? var.policy : null
12+
multi_region = var.multi_region
1213
tags = var.tags
14+
1315
}
1416

1517
resource "aws_kms_alias" "main" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ variable "bypass_policy_lockout_safety_check" {
6262
default = false
6363
description = "Specifies whether to disable the policy lockout check performed when creating or updating the key's policy."
6464
}
65+
66+
variable "multi_region" {
67+
type = bool
68+
default = false
69+
description = "Indicates whether the KMS key is a multi-Region (true) or regional (false) key. Defaults to false"
70+
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 3.53.0"
7+
version = ">= 3.64.0"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)