Skip to content

feat!: Support timeouts, cidr_routing_policy, MSV of AWS provider v5 #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.37 |
| <a name="provider_aws.second_account"></a> [aws.second\_account](#provider\_aws.second\_account) | >= 5.37 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.91 |
| <a name="provider_aws.second_account"></a> [aws.second\_account](#provider\_aws.second\_account) | >= 5.91 |

## Modules

Expand Down Expand Up @@ -57,6 +57,7 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Type |
|------|------|
| [aws_route53_cidr_collection.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_cidr_collection) | resource |
| [aws_route53_health_check.failover](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_health_check) | resource |
| [aws_route53_resolver_rule.sys](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_resolver_rule) | resource |
| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source |
Expand Down
19 changes: 19 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ module "zones" {
tags = {
Name = "terraform-aws-modules-example.com"
}
timeouts = {
create = "2h"
update = "3h"
delete = "1h"
}
}

"app.terraform-aws-modules-example.com" = {
Expand Down Expand Up @@ -91,6 +96,11 @@ module "records" {
records = [
"${module.zones.primary_name_server[local.zone_name]}. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 60",
]
timeouts = {
create = "2h"
update = "2h"
delete = "1h"
}
},
{
name = ""
Expand All @@ -99,6 +109,11 @@ module "records" {
records = [
"10.10.10.10",
]
set_identifier = "dev"
cidr_routing_policy = {
collection_id = aws_route53_cidr_collection.example.id
location_name = "*"
}
},
{
key = "s3-bucket"
Expand Down Expand Up @@ -514,3 +529,7 @@ resource "aws_route53_resolver_rule" "sys" {
domain_name = "sys-example.com"
rule_type = "SYSTEM"
}

resource "aws_route53_cidr_collection" "example" {
name = "collection-1"
}
2 changes: 1 addition & 1 deletion examples/complete/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.37"
version = ">= 5.91"
}
}
}
4 changes: 2 additions & 2 deletions modules/delegation-sets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ module "zones" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.56 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

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

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/delegation-sets/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.56"
version = ">= 5.91"
}
}
}
4 changes: 2 additions & 2 deletions modules/records/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ records_jsonencoded = jsonencode([
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

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

## Modules

Expand Down
19 changes: 19 additions & 0 deletions modules/records/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,23 @@ resource "aws_route53_record" "this" {
}
}
}

dynamic "cidr_routing_policy" {
for_each = try([each.value.cidr_routing_policy], [])

content {
collection_id = cidr_routing_policy.value.collection_id
location_name = cidr_routing_policy.value.location_name
}
}

dynamic "timeouts" {
for_each = try([each.value.timeouts], [])

content {
create = try(timeouts.value.create, null)
update = try(timeouts.value.update, null)
delete = try(timeouts.value.delete, null)
}
}
}
2 changes: 1 addition & 1 deletion modules/records/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.37"
version = ">= 5.91"
}
}
}
4 changes: 2 additions & 2 deletions modules/resolver-endpoints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This module creates Route53 Resolver Endpoints.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.32 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

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

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/resolver-endpoints/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.32"
version = ">= 5.91"
}
}
}
4 changes: 2 additions & 2 deletions modules/resolver-rule-associations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ module "resolver_rule_associations" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.56 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

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

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/resolver-rule-associations/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.56"
version = ">= 5.91"
}
}
}
6 changes: 3 additions & 3 deletions modules/zone-cross-account-vpc-association/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ module "zone_cross_account_vpc_association" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.56 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws.r53_owner"></a> [aws.r53\_owner](#provider\_aws.r53\_owner) | >= 3.56 |
| <a name="provider_aws.vpc_owner"></a> [aws.vpc\_owner](#provider\_aws.vpc\_owner) | >= 3.56 |
| <a name="provider_aws.r53_owner"></a> [aws.r53\_owner](#provider\_aws.r53\_owner) | >= 5.91 |
| <a name="provider_aws.vpc_owner"></a> [aws.vpc\_owner](#provider\_aws.vpc\_owner) | >= 5.91 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/zone-cross-account-vpc-association/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.56"
version = ">= 5.91"
configuration_aliases = [aws.r53_owner, aws.vpc_owner]
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/zones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This module creates Route53 zones.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.36.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.91 |

## Providers

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

## Modules

Expand Down
10 changes: 10 additions & 0 deletions modules/zones/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ resource "aws_route53_zone" "this" {
lookup(each.value, "tags", {}),
var.tags
)

dynamic "timeouts" {
for_each = try([each.value.timeouts], [])

content {
create = try(timeouts.value.create, null)
update = try(timeouts.value.update, null)
delete = try(timeouts.value.delete, null)
}
}
}
2 changes: 1 addition & 1 deletion modules/zones/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 = ">= 4.36.0"
version = ">= 5.91"
}
}
}