Skip to content

Commit f5360f1

Browse files
feat!: Handle new region parameter introduced in terraform-aws 6.0
1 parent 61c702b commit f5360f1

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ module "acm" {
180180
| Name | Version |
181181
|------|---------|
182182
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
183-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.40 |
183+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
184184

185185
## Providers
186186

187187
| Name | Version |
188188
|------|---------|
189-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40 |
189+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
190190

191191
## Modules
192192

@@ -215,6 +215,7 @@ No modules.
215215
| <a name="input_key_algorithm"></a> [key\_algorithm](#input\_key\_algorithm) | Specifies the algorithm of the public and private key pair that your Amazon issued certificate uses to encrypt data | `string` | `null` | no |
216216
| <a name="input_private_authority_arn"></a> [private\_authority\_arn](#input\_private\_authority\_arn) | Private Certificate Authority ARN for issuing private certificates | `string` | `null` | no |
217217
| <a name="input_putin_khuylo"></a> [putin\_khuylo](#input\_putin\_khuylo) | Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo! | `bool` | `true` | no |
218+
| <a name="input_region"></a> [region](#input\_region) | Region to create the resources into | `string` | `null` | no |
218219
| <a name="input_subject_alternative_names"></a> [subject\_alternative\_names](#input\_subject\_alternative\_names) | A list of domains that should be SANs in the issued certificate | `list(string)` | `[]` | no |
219220
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
220221
| <a name="input_validate_certificate"></a> [validate\_certificate](#input\_validate\_certificate) | Whether to validate certificate by creating Route53 record | `bool` | `true` | no |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ resource "aws_acm_certificate" "this" {
2323
subject_alternative_names = var.subject_alternative_names
2424
validation_method = var.validation_method
2525
key_algorithm = var.key_algorithm
26+
region = var.region
2627

2728
certificate_authority_arn = var.private_authority_arn
2829

@@ -67,6 +68,7 @@ resource "aws_acm_certificate_validation" "this" {
6768
count = local.create_certificate && var.validation_method != null && var.validate_certificate && var.wait_for_validation ? 1 : 0
6869

6970
certificate_arn = aws_acm_certificate.this[0].arn
71+
region = var.region
7072

7173
validation_record_fqdns = flatten([aws_route53_record.validation[*].fqdn, var.validation_record_fqdns])
7274

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ variable "domain_name" {
4646
default = ""
4747
}
4848

49+
variable "region" {
50+
description = "Region to create the resources into"
51+
type = string
52+
default = null
53+
}
54+
4955
variable "subject_alternative_names" {
5056
description = "A list of domains that should be SANs in the issued certificate"
5157
type = list(string)

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 = ">= 4.40"
7+
version = ">= 6.0"
88
}
99
}
1010
}

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module "wrapper" {
1414
key_algorithm = try(each.value.key_algorithm, var.defaults.key_algorithm, null)
1515
private_authority_arn = try(each.value.private_authority_arn, var.defaults.private_authority_arn, null)
1616
putin_khuylo = try(each.value.putin_khuylo, var.defaults.putin_khuylo, true)
17+
region = try(each.value.region, var.defaults.region, null)
1718
subject_alternative_names = try(each.value.subject_alternative_names, var.defaults.subject_alternative_names, [])
1819
tags = try(each.value.tags, var.defaults.tags, {})
1920
validate_certificate = try(each.value.validate_certificate, var.defaults.validate_certificate, true)

wrappers/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 = ">= 4.40"
7+
version = ">= 6.0"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)