Skip to content

Commit f8c96ce

Browse files
authored
feat!: Support rotation_period_in_days, AWS Provider v5, Terraform MSV 1.3 (#32)
* rotation_period_in_days * terraform MSV 1.3
1 parent 22226b6 commit f8c96ce

File tree

7 files changed

+19
-10
lines changed

7 files changed

+19
-10
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
146146

147147
| Name | Version |
148148
|------|---------|
149-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
150-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.33 |
149+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
150+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.49 |
151151

152152
## Providers
153153

154154
| Name | Version |
155155
|------|---------|
156-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.33 |
156+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.49 |
157157

158158
## Modules
159159

@@ -211,6 +211,7 @@ No modules.
211211
| <a name="input_policy"></a> [policy](#input\_policy) | A valid policy JSON document. Although this is a key policy, not an IAM policy, an `aws_iam_policy_document`, in the form that designates a principal, can be used | `string` | `null` | no |
212212
| <a name="input_primary_external_key_arn"></a> [primary\_external\_key\_arn](#input\_primary\_external\_key\_arn) | The primary external key arn of a multi-region replica external key | `string` | `null` | no |
213213
| <a name="input_primary_key_arn"></a> [primary\_key\_arn](#input\_primary\_key\_arn) | The primary key arn of a multi-region replica key | `string` | `null` | no |
214+
| <a name="input_rotation_period_in_days"></a> [rotation\_period\_in\_days](#input\_rotation\_period\_in\_days) | Custom period of time between each rotation date. Must be a number between 90 and 2560 (inclusive) | `number` | `null` | no |
214215
| <a name="input_route53_dnssec_sources"></a> [route53\_dnssec\_sources](#input\_route53\_dnssec\_sources) | A list of maps containing `account_ids` and Route53 `hosted_zone_arn` that will be allowed to sign DNSSEC records | `list(any)` | `[]` | no |
215216
| <a name="input_source_policy_documents"></a> [source\_policy\_documents](#input\_source\_policy\_documents) | List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s | `list(string)` | `[]` | no |
216217
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |

examples/complete/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Note that this example may create resources which will incur monetary charges on
2424

2525
| Name | Version |
2626
|------|---------|
27-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
28-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.33 |
27+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
28+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.49 |
2929

3030
## Providers
3131

3232
| Name | Version |
3333
|------|---------|
34-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.33 |
34+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.49 |
3535

3636
## Modules
3737

examples/complete/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.33"
7+
version = ">= 5.49"
88
}
99
}
1010
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resource "aws_kms_key" "this" {
2828
key_usage = var.key_usage
2929
multi_region = var.multi_region
3030
policy = coalesce(var.policy, data.aws_iam_policy_document.this[0].json)
31+
rotation_period_in_days = var.rotation_period_in_days
3132

3233
tags = var.tags
3334
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ variable "route53_dnssec_sources" {
182182
default = []
183183
}
184184

185+
variable "rotation_period_in_days" {
186+
description = "Custom period of time between each rotation date. Must be a number between 90 and 2560 (inclusive)"
187+
type = number
188+
default = null
189+
}
190+
185191
################################################################################
186192
# Replica Key
187193
################################################################################

versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.33"
7+
version = ">= 5.49"
88
}
99
}
1010
}

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module "wrapper" {
3737
policy = try(each.value.policy, var.defaults.policy, null)
3838
primary_external_key_arn = try(each.value.primary_external_key_arn, var.defaults.primary_external_key_arn, null)
3939
primary_key_arn = try(each.value.primary_key_arn, var.defaults.primary_key_arn, null)
40+
rotation_period_in_days = try(each.value.rotation_period_in_days, var.defaults.rotation_period_in_days, null)
4041
route53_dnssec_sources = try(each.value.route53_dnssec_sources, var.defaults.route53_dnssec_sources, [])
4142
source_policy_documents = try(each.value.source_policy_documents, var.defaults.source_policy_documents, [])
4243
tags = try(each.value.tags, var.defaults.tags, {})

0 commit comments

Comments
 (0)