diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a8206b6..eedadaa 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
- rev: v1.77.1
+ rev: v1.80.0
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
diff --git a/examples/complete-alb/README.md b/examples/complete-alb/README.md
index bd3241e..75c10f3 100644
--- a/examples/complete-alb/README.md
+++ b/examples/complete-alb/README.md
@@ -34,13 +34,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Source | Version |
|------|--------|---------|
-| [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 3.0 |
+| [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 4.0 |
| [alb](#module\_alb) | ../../ | n/a |
-| [lambda\_with\_allowed\_triggers](#module\_lambda\_with\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 3.0 |
-| [lambda\_without\_allowed\_triggers](#module\_lambda\_without\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 3.0 |
+| [lambda\_with\_allowed\_triggers](#module\_lambda\_with\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 5.0 |
+| [lambda\_without\_allowed\_triggers](#module\_lambda\_without\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 5.0 |
| [lb\_disabled](#module\_lb\_disabled) | ../../ | n/a |
-| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
-| [wildcard\_cert](#module\_wildcard\_cert) | terraform-aws-modules/acm/aws | ~> 3.0 |
+| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
+| [wildcard\_cert](#module\_wildcard\_cert) | terraform-aws-modules/acm/aws | ~> 4.0 |
## Resources
diff --git a/examples/complete-alb/main.tf b/examples/complete-alb/main.tf
index 7ac5476..64dfcc4 100644
--- a/examples/complete-alb/main.tf
+++ b/examples/complete-alb/main.tf
@@ -1,5 +1,11 @@
provider "aws" {
region = local.region
+
+ # Make it faster by skipping something
+ skip_metadata_api_check = true
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_requesting_account_id = true
}
data "aws_availability_zones" "available" {}
@@ -500,7 +506,7 @@ resource "null_resource" "download_package" {
module "lambda_with_allowed_triggers" {
source = "terraform-aws-modules/lambda/aws"
- version = "~> 3.0"
+ version = "~> 5.0"
function_name = "${local.name}-with-allowed-triggers"
description = "My awesome lambda function (with allowed triggers)"
@@ -524,7 +530,7 @@ module "lambda_with_allowed_triggers" {
module "lambda_without_allowed_triggers" {
source = "terraform-aws-modules/lambda/aws"
- version = "~> 3.0"
+ version = "~> 5.0"
function_name = "${local.name}-without-allowed-triggers"
description = "My awesome lambda function (without allowed triggers)"
@@ -548,7 +554,7 @@ module "lambda_without_allowed_triggers" {
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
- version = "~> 3.0"
+ version = "~> 5.0"
name = local.name
cidr = local.vpc_cidr
@@ -557,8 +563,8 @@ module "vpc" {
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 4, k)]
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
- enable_nat_gateway = true
- single_nat_gateway = true
+ # Disabled NAT gateway to save a few seconds running this example
+ enable_nat_gateway = false
enable_dns_hostnames = true
tags = local.tags
@@ -570,7 +576,7 @@ data "aws_route53_zone" "this" {
module "acm" {
source = "terraform-aws-modules/acm/aws"
- version = "~> 3.0"
+ version = "~> 4.0"
domain_name = var.domain_name
zone_id = data.aws_route53_zone.this.id
@@ -578,7 +584,7 @@ module "acm" {
module "wildcard_cert" {
source = "terraform-aws-modules/acm/aws"
- version = "~> 3.0"
+ version = "~> 4.0"
domain_name = "*.${var.domain_name}"
zone_id = data.aws_route53_zone.this.id
diff --git a/examples/complete-nlb/README.md b/examples/complete-nlb/README.md
index ce75f9a..b0337bb 100644
--- a/examples/complete-nlb/README.md
+++ b/examples/complete-nlb/README.md
@@ -32,9 +32,9 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Source | Version |
|------|--------|---------|
-| [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 3.0 |
+| [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 4.0 |
| [nlb](#module\_nlb) | ../../ | n/a |
-| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
+| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
## Resources
diff --git a/examples/complete-nlb/main.tf b/examples/complete-nlb/main.tf
index f189ca8..fbb5e05 100644
--- a/examples/complete-nlb/main.tf
+++ b/examples/complete-nlb/main.tf
@@ -1,5 +1,11 @@
provider "aws" {
region = local.region
+
+ # Make it faster by skipping something
+ skip_metadata_api_check = true
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_requesting_account_id = true
}
data "aws_availability_zones" "available" {}
@@ -125,7 +131,7 @@ module "nlb" {
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
- version = "~> 3.0"
+ version = "~> 5.0"
name = local.name
cidr = local.vpc_cidr
@@ -134,8 +140,8 @@ module "vpc" {
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 4, k)]
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
- enable_nat_gateway = true
- single_nat_gateway = true
+ # Disabled NAT gateway to save a few seconds running this example
+ enable_nat_gateway = false
enable_dns_hostnames = true
tags = local.tags
@@ -147,7 +153,7 @@ data "aws_route53_zone" "this" {
module "acm" {
source = "terraform-aws-modules/acm/aws"
- version = "~> 3.0"
+ version = "~> 4.0"
domain_name = var.domain_name
zone_id = data.aws_route53_zone.this.id
@@ -155,5 +161,6 @@ module "acm" {
resource "aws_eip" "this" {
count = length(local.azs)
- vpc = true
+
+ domain = "vpc"
}
diff --git a/main.tf b/main.tf
index 64de078..aac064c 100644
--- a/main.tf
+++ b/main.tf
@@ -635,7 +635,7 @@ resource "aws_lb_listener" "frontend_http_tcp" {
# Defaults to forward action if action_type not specified
content {
type = lookup(default_action.value, "action_type", "forward")
- target_group_arn = contains([null, ""], lookup(default_action.value, "action_type", "")) ? aws_lb_target_group.main[lookup(default_action.value, "target_group_index", count.index)].id : null
+ target_group_arn = contains([null, "", "forward"], lookup(default_action.value, "action_type", "")) ? aws_lb_target_group.main[lookup(default_action.value, "target_group_index", count.index)].id : null
dynamic "redirect" {
for_each = length(keys(lookup(default_action.value, "redirect", {}))) == 0 ? [] : [lookup(default_action.value, "redirect", {})]
diff --git a/wrappers/outputs.tf b/wrappers/outputs.tf
index 5da7c09..ec6da5f 100644
--- a/wrappers/outputs.tf
+++ b/wrappers/outputs.tf
@@ -1,5 +1,5 @@
output "wrapper" {
description = "Map of outputs of a wrapper."
value = module.wrapper
- # sensitive = false # No sensitive module output found
+ # sensitive = false # No sensitive module output found
}