Skip to content
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

fix: Updated supported Terraform versions #173

Merged
merged 1 commit into from
Nov 24, 2020
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
20 changes: 18 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.27.0
rev: v1.44.0
hooks:
- id: terraform_fmt
- id: terraform_validate
- id: terraform_docs
- id: terraform_tflint
args:
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v3.3.0
hooks:
- id: check-merge-conflict
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ module "lb" {

| Name | Version |
|------|---------|
| terraform | >= 0.12.6, < 0.14 |
| aws | >= 2.54, < 4.0 |
| terraform | >= 0.12.6 |
| aws | >= 2.54 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.54, < 4.0 |
| aws | >= 2.54 |

## Inputs

Expand All @@ -322,6 +322,7 @@ module "lb" {
| enable\_http2 | Indicates whether HTTP/2 is enabled in application load balancers. | `bool` | `true` | no |
| extra\_ssl\_certs | A list of maps describing any extra SSL certificates to apply to the HTTPS listeners. Required key/values: certificate\_arn, https\_listener\_index (the index of the listener within https\_listeners which the cert applies toward). | `list(map(string))` | `[]` | no |
| http\_tcp\_listeners | A list of maps describing the HTTP listeners or TCP ports for this ALB. Required key/values: port, protocol. Optional key/values: target\_group\_index (defaults to http\_tcp\_listeners[count.index]) | `any` | `[]` | no |
| https\_listener\_rules | A list of maps describing the Listener Rules for this ALB. Required key/values: actions, conditions. Optional key/values: priority, https\_listener\_index (default to https\_listeners[count.index]) | `any` | `[]` | no |
| https\_listeners | A list of maps describing the HTTPS listeners for this ALB. Required key/values: port, certificate\_arn. Optional key/values: ssl\_policy (defaults to ELBSecurityPolicy-2016-08), target\_group\_index (defaults to https\_listeners[count.index]) | `any` | `[]` | no |
| idle\_timeout | The time in seconds that the connection is allowed to be idle. | `number` | `60` | no |
| internal | Boolean determining if the load balancer is internal or externally facing. | `bool` | `false` | no |
Expand Down
10 changes: 7 additions & 3 deletions examples/complete-alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ Note that this example may create resources which cost money. Run `terraform des
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.54 |
| random | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| random | n/a |
| aws | >= 2.54 |
| random | >= 2.0 |

## Inputs

Expand Down
35 changes: 22 additions & 13 deletions examples/complete-alb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ module "security_group" {
egress_rules = ["all-all"]
}

//module "log_bucket" {
// source = "terraform-aws-modules/s3-bucket/aws"
// version = "~> 1.0"
//
// bucket = "logs-${random_pet.this.id}"
// acl = "log-delivery-write"
// force_destroy = true
// attach_elb_log_delivery_policy = true
//}
# module "log_bucket" {
# source = "terraform-aws-modules/s3-bucket/aws"
# version = "~> 1.0"
#
# bucket = "logs-${random_pet.this.id}"
# acl = "log-delivery-write"
# force_destroy = true
# attach_elb_log_delivery_policy = true
# }

module "acm" {
source = "terraform-aws-modules/acm/aws"
Expand Down Expand Up @@ -92,10 +92,10 @@ module "alb" {
security_groups = [module.security_group.this_security_group_id]
subnets = data.aws_subnet_ids.all.ids

// # 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
// }
# # 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
# }

http_tcp_listeners = [
# Forward action is default, either when defined or undefined
Expand Down Expand Up @@ -308,3 +308,12 @@ module "alb" {
MyGlobalTargetGroupTag = "bar"
}
}

#########################
# LB will not be created
#########################
module "lb_disabled" {
source = "../../"

create_lb = false
}
Empty file.
8 changes: 8 additions & 0 deletions examples/complete-alb/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.54"
random = ">= 2.0"
}
}
10 changes: 7 additions & 3 deletions examples/complete-nlb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ Note that this example may create resources which cost money. Run `terraform des
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.54 |
| random | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| random | n/a |
| aws | >= 2.54 |
| random | >= 2.0 |

## Inputs

Expand Down
36 changes: 18 additions & 18 deletions examples/complete-nlb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ data "aws_route53_zone" "this" {
name = local.domain_name
}

//module "log_bucket" {
// source = "terraform-aws-modules/s3-bucket/aws"
// version = "~> 1.0"
//
// bucket = "logs-${random_pet.this.id}"
// acl = "log-delivery-write"
// force_destroy = true
// attach_elb_log_delivery_policy = true
//}
# module "log_bucket" {
# source = "terraform-aws-modules/s3-bucket/aws"
# version = "~> 1.0"
#
# bucket = "logs-${random_pet.this.id}"
# acl = "log-delivery-write"
# force_destroy = true
# attach_elb_log_delivery_policy = true
# }

module "acm" {
source = "terraform-aws-modules/acm/aws"
Expand Down Expand Up @@ -61,19 +61,19 @@ module "nlb" {

vpc_id = data.aws_vpc.default.id

// Use `subnets` if you don't want to attach EIPs
// subnets = tolist(data.aws_subnet_ids.all.ids)
# Use `subnets` if you don't want to attach EIPs
# subnets = tolist(data.aws_subnet_ids.all.ids)

// Use `subnet_mapping` to attach EIPs
# Use `subnet_mapping` to attach EIPs
subnet_mapping = [for i, eip in aws_eip.this : { allocation_id : eip.id, subnet_id : tolist(data.aws_subnet_ids.all.ids)[i] }]

// # 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
// }
# # 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
# }


// TCP_UDP, UDP, TCP
# TCP_UDP, UDP, TCP
http_tcp_listeners = [
{
port = 81
Expand All @@ -92,7 +92,7 @@ module "nlb" {
},
]

// TLS
# TLS
https_listeners = [
{
port = 84
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions examples/complete-nlb/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.54"
random = ">= 2.0"
}
}
34 changes: 0 additions & 34 deletions examples/disabled/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions examples/disabled/main.tf

This file was deleted.

4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_version = ">= 0.12.6, < 0.14"
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.54, < 4.0"
aws = ">= 2.54"
}
}