Skip to content

Commit 7bed76a

Browse files
committed
Merge branch 'master' of github.com:bryantbiggs/terraform-aws-apigateway-v2 into chore/updates-for-websocket-support
2 parents 524c291 + 8be9669 commit 7bed76a

File tree

18 files changed

+283
-48
lines changed

18 files changed

+283
-48
lines changed

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
lock:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: dessant/lock-threads@v4
11+
- uses: dessant/lock-threads@v5
1212
with:
1313
github-token: ${{ secrets.GITHUB_TOKEN }}
1414
issue-comment: >

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
# Please look up the latest version from
1616
# https://github.com/amannn/action-semantic-pull-request/releases
17-
- uses: amannn/action-semantic-pull-request@v5.0.2
17+
- uses: amannn/action-semantic-pull-request@v5.4.0
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
with:

.github/workflows/pre-commit.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
TERRAFORM_DOCS_VERSION: v0.16.0
11-
TFLINT_VERSION: v0.44.1
11+
TFLINT_VERSION: v0.50.3
1212

1313
jobs:
1414
collectInputs:
@@ -18,11 +18,11 @@ jobs:
1818
directories: ${{ steps.dirs.outputs.directories }}
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Get root directories
2424
id: dirs
25-
uses: clowdhaus/terraform-composite-actions/directories@v1.8.3
25+
uses: clowdhaus/terraform-composite-actions/directories@v1.9.0
2626

2727
preCommitMinVersions:
2828
name: Min TF pre-commit
@@ -32,19 +32,27 @@ jobs:
3232
matrix:
3333
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
3434
steps:
35+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
36+
- name: Delete huge unnecessary tools folder
37+
run: |
38+
rm -rf /opt/hostedtoolcache/CodeQL
39+
rm -rf /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
40+
rm -rf /opt/hostedtoolcache/Ruby
41+
rm -rf /opt/hostedtoolcache/go
42+
3543
- name: Checkout
36-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
3745

3846
- name: Terraform min/max versions
3947
id: minMax
40-
uses: clowdhaus/terraform-min-max@v1.2.4
48+
uses: clowdhaus/terraform-min-max@v1.3.0
4149
with:
4250
directory: ${{ matrix.directory }}
4351

4452
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
4553
# Run only validate pre-commit check on min version supported
4654
if: ${{ matrix.directory != '.' }}
47-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
55+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
4856
with:
4957
terraform-version: ${{ steps.minMax.outputs.minVersion }}
5058
tflint-version: ${{ env.TFLINT_VERSION }}
@@ -53,7 +61,7 @@ jobs:
5361
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
5462
# Run only validate pre-commit check on min version supported
5563
if: ${{ matrix.directory == '.' }}
56-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
64+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
5765
with:
5866
terraform-version: ${{ steps.minMax.outputs.minVersion }}
5967
tflint-version: ${{ env.TFLINT_VERSION }}
@@ -64,18 +72,26 @@ jobs:
6472
runs-on: ubuntu-latest
6573
needs: collectInputs
6674
steps:
75+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
76+
- name: Delete huge unnecessary tools folder
77+
run: |
78+
rm -rf /opt/hostedtoolcache/CodeQL
79+
rm -rf /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
80+
rm -rf /opt/hostedtoolcache/Ruby
81+
rm -rf /opt/hostedtoolcache/go
82+
6783
- name: Checkout
68-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
6985
with:
7086
ref: ${{ github.event.pull_request.head.ref }}
7187
repository: ${{github.event.pull_request.head.repo.full_name}}
7288

7389
- name: Terraform min/max versions
7490
id: minMax
75-
uses: clowdhaus/terraform-min-max@v1.2.4
91+
uses: clowdhaus/terraform-min-max@v1.3.0
7692

7793
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
78-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
94+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
7995
with:
8096
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
8197
tflint-version: ${{ env.TFLINT_VERSION }}

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ jobs:
2020
if: github.repository_owner == 'terraform-aws-modules'
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
persist-credentials: false
2626
fetch-depth: 0
2727

2828
- name: Release
29-
uses: cycjimmy/semantic-release-action@v3
29+
uses: cycjimmy/semantic-release-action@v4
3030
with:
31-
semantic_version: 18.0.0
31+
semantic_version: 23.0.2
3232
extra_plugins: |
33-
@semantic-release/[email protected].0
34-
@semantic-release/[email protected].0
35-
conventional-changelog-conventionalcommits@4.6.3
33+
@semantic-release/[email protected].3
34+
@semantic-release/[email protected].1
35+
conventional-changelog-conventionalcommits@7.0.2
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

.github/workflows/stale-actions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v6
10+
- uses: actions/stale@v9
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
1313
# Staling issues and PR's

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.82.0
3+
rev: v1.89.1
44
hooks:
55
- id: terraform_fmt
6-
- id: terraform_validate
6+
- id: terraform_wrapper_module_for_each
77
- id: terraform_docs
88
args:
99
- '--args=--lockfile=false'
@@ -22,8 +22,10 @@ repos:
2222
- '--args=--only=terraform_required_providers'
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
25+
- id: terraform_validate
2526
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.4.0
27+
rev: v4.6.0
2728
hooks:
2829
- id: check-merge-conflict
2930
- id: end-of-file-fixer
31+
- id: trailing-whitespace

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.0.0](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/compare/v3.1.1...v4.0.0) (2024-03-14)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* Added creation of CW Log Group. Bump AWS provider version. (#103)
11+
12+
### Features
13+
14+
* Added creation of CW Log Group. Bump AWS provider version. ([#103](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/issues/103)) ([c123558](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/commit/c12355835449be55218914677d5fb5d8f2c2f4b0))
15+
16+
## [3.1.1](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/compare/v3.1.0...v3.1.1) (2024-03-06)
17+
18+
19+
### Bug Fixes
20+
21+
* Update CI workflow versions to remove deprecated runtime warnings ([#102](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/issues/102)) ([c052dfe](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/commit/c052dfe4c6cab30a638303f6abbd7861937adc60))
22+
23+
## [3.1.0](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/compare/v3.0.0...v3.1.0) (2024-02-12)
24+
25+
26+
### Features
27+
28+
* Add variable create_route to control creation of route ([#98](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/issues/98)) ([68ad2b1](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/commit/68ad2b183a4872e29890784290b5925beee1dd29))
29+
30+
## [3.0.0](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/compare/v2.2.2...v3.0.0) (2024-02-12)
31+
32+
33+
### ⚠ BREAKING CHANGES
34+
35+
* Added the fail_on_warnings variable, bumped Terraform version to 1.0+ (#96)
36+
37+
### Features
38+
39+
* Added the fail_on_warnings variable, bumped Terraform version to 1.0+ ([#96](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/issues/96)) ([26859db](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/commit/26859db0a5d651903469f6fabeda1e341867c45d))
40+
541
### [2.2.2](https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/compare/v2.2.1...v2.2.2) (2023-01-24)
642

743

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ module "api_gateway" {
111111
| Name | Version |
112112
|------|---------|
113113
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
114-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
114+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
115115

116116
## Providers
117117

118118
| Name | Version |
119119
|------|---------|
120-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
120+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
121121

122122
## Modules
123123

examples/complete-http/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ module "api_gateway" {
3030
protocol_type = "HTTP"
3131
create_domain_name = true
3232

33+
# create_default_stage_access_log_group = true
34+
35+
fail_on_warnings = false
36+
3337
cors_configuration = {
3438
allow_headers = ["content-type", "x-amz-date", "authorization", "x-api-key", "x-amz-security-token", "x-amz-user-agent"]
3539
allow_methods = ["*"]
@@ -68,7 +72,6 @@ module "api_gateway" {
6872
}
6973

7074
integrations = {
71-
7275
"ANY /" = {
7376
lambda_arn = module.lambda_function.lambda_function_arn
7477
payload_format_version = "2.0"

examples/vpc-link-http/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,23 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2424
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2525
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3232
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
33+
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
3334

3435
## Modules
3536

3637
| Name | Source | Version |
3738
|------|--------|---------|
38-
| <a name="module_alb"></a> [alb](#module\_alb) | terraform-aws-modules/alb/aws | ~> 6.0 |
39+
| <a name="module_alb"></a> [alb](#module\_alb) | terraform-aws-modules/alb/aws | ~> 9.0 |
3940
| <a name="module_alb_security_group"></a> [alb\_security\_group](#module\_alb\_security\_group) | terraform-aws-modules/security-group/aws | ~> 5.0 |
4041
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | ../../ | n/a |
4142
| <a name="module_api_gateway_security_group"></a> [api\_gateway\_security\_group](#module\_api\_gateway\_security\_group) | terraform-aws-modules/security-group/aws | ~> 5.0 |
@@ -48,6 +49,7 @@ Note that this example may create resources which cost money. Run `terraform des
4849
| Name | Type |
4950
|------|------|
5051
| [null_resource.download_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
52+
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
5153
| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source |
5254

5355
## Inputs

examples/vpc-link-http/main.tf

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module "api_gateway" {
4848
"GET /alb-internal-route" = {
4949
connection_type = "VPC_LINK"
5050
vpc_link = "my-vpc"
51-
integration_uri = module.alb.http_tcp_listener_arns[0]
51+
integration_uri = module.alb.listeners["default"].arn
5252
integration_type = "HTTP_PROXY"
5353
integration_method = "ANY"
5454
}
@@ -87,6 +87,14 @@ module "vpc" {
8787
tags = local.tags
8888
}
8989

90+
################################
91+
# Supporting resources
92+
################################
93+
94+
resource "random_pet" "this" {
95+
length = 2
96+
}
97+
9098
module "api_gateway_security_group" {
9199
source = "terraform-aws-modules/security-group/aws"
92100
version = "~> 5.0"
@@ -106,29 +114,31 @@ module "api_gateway_security_group" {
106114

107115
module "alb" {
108116
source = "terraform-aws-modules/alb/aws"
109-
version = "~> 6.0"
117+
version = "~> 9.0"
110118

111119
name = local.name
112120

113-
vpc_id = module.vpc.vpc_id
114-
security_groups = [module.alb_security_group.security_group_id]
115-
subnets = module.vpc.public_subnets
121+
vpc_id = module.vpc.vpc_id
122+
subnets = module.vpc.public_subnets
116123

117-
http_tcp_listeners = [
118-
{
119-
port = 80
120-
protocol = "HTTP"
121-
target_group_index = 0
122-
action_type = "forward"
123-
}
124-
]
124+
enable_deletion_protection = false
125125

126-
target_groups = [
127-
{
128-
name_prefix = "l1-"
129-
target_type = "lambda"
126+
security_group_ingress_rules = {
127+
all_http = {
128+
from_port = 80
129+
to_port = 80
130+
ip_protocol = "tcp"
131+
description = "HTTP web traffic"
132+
cidr_ipv4 = "0.0.0.0/0"
130133
}
131-
]
134+
all_https = {
135+
from_port = 443
136+
to_port = 443
137+
ip_protocol = "tcp"
138+
description = "HTTPS web traffic"
139+
cidr_ipv4 = "0.0.0.0/0"
140+
}
141+
}
132142

133143
tags = local.tags
134144
}

examples/vpc-link-http/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 = ">= 5.0"
7+
version = ">= 5.30"
88
}
99
random = {
1010
source = "hashicorp/random"

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

0 commit comments

Comments
 (0)