diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8814cf6..6dda893 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
- rev: v1.48.0
+ rev: v1.50.0
hooks:
- id: terraform_fmt
- id: terraform_validate
diff --git a/README.md b/README.md
index 941fa5c..769243b 100644
--- a/README.md
+++ b/README.md
@@ -374,15 +374,15 @@ No modules.
| [http\_tcp\_listener\_ids](#output\_http\_tcp\_listener\_ids) | The IDs of the TCP and HTTP load balancer listeners created. |
| [https\_listener\_arns](#output\_https\_listener\_arns) | The ARNs of the HTTPS load balancer listeners created. |
| [https\_listener\_ids](#output\_https\_listener\_ids) | The IDs of the load balancer listeners created. |
+| [lb\_arn](#output\_lb\_arn) | The ID and ARN of the load balancer we created. |
+| [lb\_arn\_suffix](#output\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
+| [lb\_dns\_name](#output\_lb\_dns\_name) | The DNS name of the load balancer. |
+| [lb\_id](#output\_lb\_id) | The ID and ARN of the load balancer we created. |
+| [lb\_zone\_id](#output\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
| [target\_group\_arn\_suffixes](#output\_target\_group\_arn\_suffixes) | ARN suffixes of our target groups - can be used with CloudWatch. |
| [target\_group\_arns](#output\_target\_group\_arns) | ARNs of the target groups. Useful for passing to your Auto Scaling group. |
| [target\_group\_attachments](#output\_target\_group\_attachments) | ARNs of the target group attachment IDs. |
| [target\_group\_names](#output\_target\_group\_names) | Name of the target group. Useful for passing to your CodeDeploy Deployment Group. |
-| [this\_lb\_arn](#output\_this\_lb\_arn) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_arn\_suffix](#output\_this\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
-| [this\_lb\_dns\_name](#output\_this\_lb\_dns\_name) | The DNS name of the load balancer. |
-| [this\_lb\_id](#output\_this\_lb\_id) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_zone\_id](#output\_this\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
## Authors
diff --git a/examples/complete-alb/README.md b/examples/complete-alb/README.md
index 5def83c..3cb24b4 100644
--- a/examples/complete-alb/README.md
+++ b/examples/complete-alb/README.md
@@ -36,9 +36,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 | ~> 2.0 |
+| [acm](#module\_acm) | terraform-aws-modules/acm/aws | |
| [alb](#module\_alb) | ../../ | |
-| [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 1.0 |
+| [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 2.0 |
| [lb\_disabled](#module\_lb\_disabled) | ../../ | |
| [security\_group](#module\_security\_group) | terraform-aws-modules/security-group/aws | ~> 3.0 |
@@ -69,13 +69,13 @@ No inputs.
| [http\_tcp\_listener\_ids](#output\_http\_tcp\_listener\_ids) | The IDs of the TCP and HTTP load balancer listeners created. |
| [https\_listener\_arns](#output\_https\_listener\_arns) | The ARNs of the HTTPS load balancer listeners created. |
| [https\_listener\_ids](#output\_https\_listener\_ids) | The IDs of the load balancer listeners created. |
+| [lb\_arn](#output\_lb\_arn) | The ID and ARN of the load balancer we created. |
+| [lb\_arn\_suffix](#output\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
+| [lb\_dns\_name](#output\_lb\_dns\_name) | The DNS name of the load balancer. |
+| [lb\_id](#output\_lb\_id) | The ID and ARN of the load balancer we created. |
+| [lb\_zone\_id](#output\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
| [target\_group\_arn\_suffixes](#output\_target\_group\_arn\_suffixes) | ARN suffixes of our target groups - can be used with CloudWatch. |
| [target\_group\_arns](#output\_target\_group\_arns) | ARNs of the target groups. Useful for passing to your Auto Scaling group. |
| [target\_group\_attachments](#output\_target\_group\_attachments) | ARNs of the target group attachment IDs. |
| [target\_group\_names](#output\_target\_group\_names) | Name of the target group. Useful for passing to your CodeDeploy Deployment Group. |
-| [this\_lb\_arn](#output\_this\_lb\_arn) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_arn\_suffix](#output\_this\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
-| [this\_lb\_dns\_name](#output\_this\_lb\_dns\_name) | The DNS name of the load balancer. |
-| [this\_lb\_id](#output\_this\_lb\_id) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_zone\_id](#output\_this\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
diff --git a/examples/complete-alb/main.tf b/examples/complete-alb/main.tf
index fb31a1f..bb62d2b 100644
--- a/examples/complete-alb/main.tf
+++ b/examples/complete-alb/main.tf
@@ -49,8 +49,7 @@ module "security_group" {
# }
module "acm" {
- source = "terraform-aws-modules/acm/aws"
- version = "~> 2.0"
+ source = "terraform-aws-modules/acm/aws"
domain_name = local.domain_name # trimsuffix(data.aws_route53_zone.this.name, ".") # Terraform >= 0.12.17
zone_id = data.aws_route53_zone.this.id
@@ -94,7 +93,7 @@ module "alb" {
# # See notes in README (ref: https://github.com/terraform-providers/terraform-provider-aws/issues/7987)
# access_logs = {
- # bucket = module.log_bucket.this_s3_bucket_id
+ # bucket = module.log_bucket.s3_bucket_id
# }
http_tcp_listeners = [
@@ -131,7 +130,7 @@ module "alb" {
{
port = 443
protocol = "HTTPS"
- certificate_arn = module.acm.this_acm_certificate_arn
+ certificate_arn = module.acm.acm_certificate_arn
target_group_index = 1
},
# Authentication actions only allowed with HTTPS
@@ -140,7 +139,7 @@ module "alb" {
protocol = "HTTPS"
action_type = "authenticate-cognito"
target_group_index = 1
- certificate_arn = module.acm.this_acm_certificate_arn
+ certificate_arn = module.acm.acm_certificate_arn
authenticate_cognito = {
authentication_request_extra_params = {
display = "page"
@@ -159,7 +158,7 @@ module "alb" {
protocol = "HTTPS"
action_type = "authenticate-oidc"
target_group_index = 1
- certificate_arn = module.acm.this_acm_certificate_arn
+ certificate_arn = module.acm.acm_certificate_arn
authenticate_oidc = {
authentication_request_extra_params = {
display = "page"
@@ -311,7 +310,7 @@ module "alb" {
# AccessDenied: elasticloadbalancing principal does not
# have permission to invoke ... from target group ...
my_lambda = {
- target_id = module.lambda_function.this_lambda_function_arn
+ target_id = module.lambda_function.lambda_function_arn
}
}
},
@@ -390,7 +389,7 @@ resource "null_resource" "download_package" {
module "lambda_function" {
source = "terraform-aws-modules/lambda/aws"
- version = "~> 1.0"
+ version = "~> 2.0"
function_name = "${random_pet.this.id}-lambda"
description = "My awesome lambda function"
diff --git a/examples/complete-alb/outputs.tf b/examples/complete-alb/outputs.tf
index bdd4589..864b493 100644
--- a/examples/complete-alb/outputs.tf
+++ b/examples/complete-alb/outputs.tf
@@ -1,26 +1,26 @@
-output "this_lb_id" {
+output "lb_id" {
description = "The ID and ARN of the load balancer we created."
- value = module.alb.this_lb_id
+ value = module.alb.lb_id
}
-output "this_lb_arn" {
+output "lb_arn" {
description = "The ID and ARN of the load balancer we created."
- value = module.alb.this_lb_arn
+ value = module.alb.lb_arn
}
-output "this_lb_dns_name" {
+output "lb_dns_name" {
description = "The DNS name of the load balancer."
- value = module.alb.this_lb_dns_name
+ value = module.alb.lb_dns_name
}
-output "this_lb_arn_suffix" {
+output "lb_arn_suffix" {
description = "ARN suffix of our load balancer - can be used with CloudWatch."
- value = module.alb.this_lb_arn_suffix
+ value = module.alb.lb_arn_suffix
}
-output "this_lb_zone_id" {
+output "lb_zone_id" {
description = "The zone_id of the load balancer to assist with creating DNS records."
- value = module.alb.this_lb_zone_id
+ value = module.alb.lb_zone_id
}
output "http_tcp_listener_arns" {
diff --git a/examples/complete-nlb/README.md b/examples/complete-nlb/README.md
index 58f704e..42ca4a9 100644
--- a/examples/complete-nlb/README.md
+++ b/examples/complete-nlb/README.md
@@ -34,7 +34,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Source | Version |
|------|--------|---------|
-| [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 2.0 |
+| [acm](#module\_acm) | terraform-aws-modules/acm/aws | |
| [nlb](#module\_nlb) | ../../ | |
## Resources
@@ -59,12 +59,12 @@ No inputs.
| [http\_tcp\_listener\_ids](#output\_http\_tcp\_listener\_ids) | The IDs of the TCP and HTTP load balancer listeners created. |
| [https\_listener\_arns](#output\_https\_listener\_arns) | The ARNs of the HTTPS load balancer listeners created. |
| [https\_listener\_ids](#output\_https\_listener\_ids) | The IDs of the load balancer listeners created. |
+| [lb\_arn](#output\_lb\_arn) | The ID and ARN of the load balancer we created. |
+| [lb\_arn\_suffix](#output\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
+| [lb\_dns\_name](#output\_lb\_dns\_name) | The DNS name of the load balancer. |
+| [lb\_id](#output\_lb\_id) | The ID and ARN of the load balancer we created. |
+| [lb\_zone\_id](#output\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
| [target\_group\_arn\_suffixes](#output\_target\_group\_arn\_suffixes) | ARN suffixes of our target groups - can be used with CloudWatch. |
| [target\_group\_arns](#output\_target\_group\_arns) | ARNs of the target groups. Useful for passing to your Auto Scaling group. |
| [target\_group\_names](#output\_target\_group\_names) | Name of the target group. Useful for passing to your CodeDeploy Deployment Group. |
-| [this\_lb\_arn](#output\_this\_lb\_arn) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_arn\_suffix](#output\_this\_lb\_arn\_suffix) | ARN suffix of our load balancer - can be used with CloudWatch. |
-| [this\_lb\_dns\_name](#output\_this\_lb\_dns\_name) | The DNS name of the load balancer. |
-| [this\_lb\_id](#output\_this\_lb\_id) | The ID and ARN of the load balancer we created. |
-| [this\_lb\_zone\_id](#output\_this\_lb\_zone\_id) | The zone\_id of the load balancer to assist with creating DNS records. |
diff --git a/examples/complete-nlb/main.tf b/examples/complete-nlb/main.tf
index f99d954..1aaa190 100644
--- a/examples/complete-nlb/main.tf
+++ b/examples/complete-nlb/main.tf
@@ -27,7 +27,6 @@ data "aws_route53_zone" "this" {
# module "log_bucket" {
# source = "terraform-aws-modules/s3-bucket/aws"
-# version = "~> 1.0"
#
# bucket = "logs-${random_pet.this.id}"
# acl = "log-delivery-write"
@@ -36,8 +35,7 @@ data "aws_route53_zone" "this" {
# }
module "acm" {
- source = "terraform-aws-modules/acm/aws"
- version = "~> 2.0"
+ source = "terraform-aws-modules/acm/aws"
domain_name = local.domain_name # trimsuffix(data.aws_route53_zone.this.name, ".") # Terraform >= 0.12.17
zone_id = data.aws_route53_zone.this.id
@@ -69,7 +67,7 @@ module "nlb" {
# # See notes in README (ref: https://github.com/terraform-providers/terraform-provider-aws/issues/7987)
# access_logs = {
- # bucket = module.log_bucket.this_s3_bucket_id
+ # bucket = module.log_bucket.s3_bucket_id
# }
@@ -97,7 +95,7 @@ module "nlb" {
{
port = 84
protocol = "TLS"
- certificate_arn = module.acm.this_acm_certificate_arn
+ certificate_arn = module.acm.acm_certificate_arn
target_group_index = 3
},
]
diff --git a/examples/complete-nlb/outputs.tf b/examples/complete-nlb/outputs.tf
index 97a329b..40f57a9 100644
--- a/examples/complete-nlb/outputs.tf
+++ b/examples/complete-nlb/outputs.tf
@@ -1,26 +1,26 @@
-output "this_lb_id" {
+output "lb_id" {
description = "The ID and ARN of the load balancer we created."
- value = module.nlb.this_lb_id
+ value = module.nlb.lb_id
}
-output "this_lb_arn" {
+output "lb_arn" {
description = "The ID and ARN of the load balancer we created."
- value = module.nlb.this_lb_arn
+ value = module.nlb.lb_arn
}
-output "this_lb_dns_name" {
+output "lb_dns_name" {
description = "The DNS name of the load balancer."
- value = module.nlb.this_lb_dns_name
+ value = module.nlb.lb_dns_name
}
-output "this_lb_arn_suffix" {
+output "lb_arn_suffix" {
description = "ARN suffix of our load balancer - can be used with CloudWatch."
- value = module.nlb.this_lb_arn_suffix
+ value = module.nlb.lb_arn_suffix
}
-output "this_lb_zone_id" {
+output "lb_zone_id" {
description = "The zone_id of the load balancer to assist with creating DNS records."
- value = module.nlb.this_lb_zone_id
+ value = module.nlb.lb_zone_id
}
output "http_tcp_listener_arns" {
diff --git a/outputs.tf b/outputs.tf
index 00da0f5..cc5bf1c 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -1,24 +1,24 @@
-output "this_lb_id" {
+output "lb_id" {
description = "The ID and ARN of the load balancer we created."
value = concat(aws_lb.this.*.id, [""])[0]
}
-output "this_lb_arn" {
+output "lb_arn" {
description = "The ID and ARN of the load balancer we created."
value = concat(aws_lb.this.*.arn, [""])[0]
}
-output "this_lb_dns_name" {
+output "lb_dns_name" {
description = "The DNS name of the load balancer."
value = concat(aws_lb.this.*.dns_name, [""])[0]
}
-output "this_lb_arn_suffix" {
+output "lb_arn_suffix" {
description = "ARN suffix of our load balancer - can be used with CloudWatch."
value = concat(aws_lb.this.*.arn_suffix, [""])[0]
}
-output "this_lb_zone_id" {
+output "lb_zone_id" {
description = "The zone_id of the load balancer to assist with creating DNS records."
value = concat(aws_lb.this.*.zone_id, [""])[0]
}