Skip to content

Commit 810341e

Browse files
committed
feat: Update versions to latest, add awscc provider
1 parent efdd9a3 commit 810341e

File tree

12 files changed

+82
-49
lines changed

12 files changed

+82
-49
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@v3
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.5.3
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
with:

.github/workflows/pre-commit.yml

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

99
env:
10-
TERRAFORM_DOCS_VERSION: v0.16.0
10+
TERRAFORM_DOCS_VERSION: v0.19.0
11+
TFLINT_VERSION: v0.56.0
1112

1213
jobs:
1314
collectInputs:
@@ -17,11 +18,11 @@ jobs:
1718
directories: ${{ steps.dirs.outputs.directories }}
1819
steps:
1920
- name: Checkout
20-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2122

2223
- name: Get root directories
2324
id: dirs
24-
uses: clowdhaus/terraform-composite-actions/directories@v1.8.3
25+
uses: clowdhaus/terraform-composite-actions/directories@v1.11.1
2526

2627
preCommitMinVersions:
2728
name: Min TF pre-commit
@@ -31,49 +32,68 @@ jobs:
3132
matrix:
3233
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
3334
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+
3443
- name: Checkout
35-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
3645

3746
- name: Terraform min/max versions
3847
id: minMax
39-
uses: clowdhaus/terraform-min-max@v1.2.4
48+
uses: clowdhaus/terraform-min-max@v1.3.2
4049
with:
4150
directory: ${{ matrix.directory }}
4251

4352
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
4453
# Run only validate pre-commit check on min version supported
4554
if: ${{ matrix.directory != '.' }}
46-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
55+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1
4756
with:
4857
terraform-version: ${{ steps.minMax.outputs.minVersion }}
58+
tflint-version: ${{ env.TFLINT_VERSION }}
4959
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
5060

5161
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
5262
# Run only validate pre-commit check on min version supported
5363
if: ${{ matrix.directory == '.' }}
54-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
64+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1
5565
with:
5666
terraform-version: ${{ steps.minMax.outputs.minVersion }}
67+
tflint-version: ${{ env.TFLINT_VERSION }}
5768
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
5869

5970
preCommitMaxVersion:
6071
name: Max TF pre-commit
6172
runs-on: ubuntu-latest
6273
needs: collectInputs
6374
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+
6483
- name: Checkout
65-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
6685
with:
6786
ref: ${{ github.event.pull_request.head.ref }}
6887
repository: ${{github.event.pull_request.head.repo.full_name}}
6988

7089
- name: Terraform min/max versions
7190
id: minMax
72-
uses: clowdhaus/terraform-min-max@v1.2.4
91+
uses: clowdhaus/terraform-min-max@v1.3.2
7392

7493
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
75-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
94+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1
7695
with:
7796
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
97+
tflint-version: ${{ env.TFLINT_VERSION }}
7898
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
7999
install-hcledit: true

.github/workflows/semantic-releaser.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020
persist-credentials: false
2121

2222
- name: Setup Node.js
23-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: 16
25+
node-version: 22
2626

2727
- name: Release
28-
uses: cycjimmy/semantic-release-action@v3
28+
uses: cycjimmy/semantic-release-action@v4
2929
with:
30-
semantic_version: 18.0.0
30+
semantic_version: 23.0.2
3131
extra_plugins: |
32-
@semantic-release/changelog@6.0.0
33-
@semantic-release/git@10.0.0
34-
conventional-changelog-conventionalcommits@4.6.3
32+
@semantic-release/changelog@6.0.3
33+
@semantic-release/git@10.0.1
34+
conventional-changelog-conventionalcommits@7.0.2
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE }}

.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

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ override.tf.json
2525
*_override.tf
2626
*_override.tf.json
2727

28-
# Include override files you do wish to add to version control using negated pattern
29-
#
30-
# !example_override.tf
31-
32-
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
33-
# example: *tfplan*
34-
3528
# Ignore CLI configuration files
3629
.terraformrc
3730
terraform.rc

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.77.2
3+
rev: v1.98.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.4.0
26+
rev: v5.0.0
2727
hooks:
2828
- id: check-merge-conflict
2929
- id: end-of-file-fixer

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ Examples codified under the [`examples`](https://github.com/clowdhaus/terraform-
4444

4545
- [Complete](https://github.com/clowdhaus/terraform-aws-<TODO>/tree/main/examples/complete)
4646

47-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
47+
<!-- BEGIN_TF_DOCS -->
4848
## Requirements
4949

5050
| Name | Version |
5151
|------|---------|
52-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
53-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
52+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
53+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |
54+
| <a name="requirement_awscc"></a> [awscc](#requirement\_awscc) | >= 1.35 |
5455

5556
## Providers
5657

@@ -71,7 +72,7 @@ No inputs.
7172
## Outputs
7273

7374
No outputs.
74-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
75+
<!-- END_TF_DOCS -->
7576

7677
## License
7778

examples/complete/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,34 @@ $ terraform apply
1616

1717
Note that this example may create resources which will incur monetary charges on your AWS bill. Run `terraform destroy` when you no longer need these resources.
1818

19-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
19+
<!-- BEGIN_TF_DOCS -->
2020
## Requirements
2121

2222
| Name | Version |
2323
|------|---------|
24-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
24+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |
26+
| <a name="requirement_awscc"></a> [awscc](#requirement\_awscc) | >= 1.35 |
2627

2728
## Providers
2829

29-
No providers.
30+
| Name | Version |
31+
|------|---------|
32+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.90 |
3033

3134
## Modules
3235

3336
| Name | Source | Version |
3437
|------|--------|---------|
3538
| <a name="module_<TODO_UNDER>"></a> [<TODO\_UNDER>](#module\_<TODO\_UNDER>) | ../.. | n/a |
3639
| <a name="module_<TODO_UNDER>_disabled"></a> [<TODO\_UNDER>\_disabled](#module\_<TODO\_UNDER>\_disabled) | ../.. | n/a |
37-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 4.0 |
40+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
3841

3942
## Resources
4043

41-
No resources.
44+
| Name | Type |
45+
|------|------|
46+
| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source |
4247

4348
## Inputs
4449

@@ -47,6 +52,6 @@ No inputs.
4752
## Outputs
4853

4954
No outputs.
50-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
55+
<!-- END_TF_DOCS -->
5156

5257
Apache-2.0 Licensed. See [LICENSE](https://github.com/clowdhaus/terraform-aws-<TODO>/blob/main/LICENSE).

examples/complete/main.tf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ provider "aws" {
22
region = local.region
33
}
44

5-
data "aws_availability_zones" "available" {}
5+
data "aws_availability_zones" "available" {
6+
# Exclude local zones
7+
filter {
8+
name = "opt-in-status"
9+
values = ["opt-in-not-required"]
10+
}
11+
}
612

713
locals {
814
region = "us-east-1"
@@ -42,14 +48,14 @@ module "<TODO_UNDER>_disabled" {
4248

4349
module "vpc" {
4450
source = "terraform-aws-modules/vpc/aws"
45-
version = "~> 4.0"
51+
version = "~> 5.0"
4652

4753
name = local.name
4854
cidr = local.vpc_cidr
4955

5056
azs = local.azs
51-
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k)]
52-
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 10)]
57+
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 4, k)]
58+
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
5359

5460
enable_nat_gateway = true
5561
single_nat_gateway = true

0 commit comments

Comments
 (0)