Skip to content

Commit

Permalink
Added multi-region feature + set minimum provider to 3.64 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed-afk91 authored Oct 27, 2023
1 parent 8408c6c commit 042f7f6
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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']
Expand All @@ -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
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
<a name="unreleased"></a>
## [Unreleased]

- Upgraded to 5.x compatibility + Added square brackets to list items requirement


<a name="2.1.0"></a>
## [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))


<a name="2.0.0"></a>
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Module managed by [uMotif](https://github.com/umotif-public/).
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.11 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.53.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.64.0 |

## Providers

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

## Modules

Expand All @@ -78,6 +78,7 @@ No modules.
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Specifies whether to create resources within this module. | `bool` | `true` | no |
| <a name="input_is_enabled"></a> [is\_enabled](#input\_is\_enabled) | Specifies whether the key is enabled. | `bool` | `true` | no |
| <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 |
| <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 |
| <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 |
| <a name="input_tags"></a> [tags](#input\_tags) | Mapping of additional tags. | `map(string)` | `{}` | no |

Expand Down
32 changes: 14 additions & 18 deletions examples/core/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/core/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion examples/core/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5"
version = "3.64.0"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.53.0"
version = ">= 3.64.0"
}
}
}

0 comments on commit 042f7f6

Please sign in to comment.