From 1ec9f8f2422d17a72c614d11e16c20bcea09d0ec Mon Sep 17 00:00:00 2001 From: ralren Date: Thu, 8 Jun 2023 11:54:07 -0700 Subject: [PATCH 1/3] deprecate older terraform versions --- .pre-commit-config.yaml | 1 - README.md | 5 ----- versions.tf | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3818b55..393332d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,5 +19,4 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.75.0 hooks: - - id: terraform_docs - id: terraform_fmt diff --git a/README.md b/README.md index acfe476..9343188 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,6 @@ Creates the following resources: * CloudWatch Event to trigger Lambda function on a schedule. * AWS Lambda function to actually delete excess manual RDS snapshots. -## Terraform Versions - -Terraform 0.13 and later: Pin module version to ~> 3.X. Submit pull requests to master branch. - -Terraform 0.12: Pin module version to ~> 2.X. Submit pull requests to terraform012 branch. ## Usage diff --git a/versions.tf b/versions.tf index 9fdbc79..99d5c63 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.13.0" + required_version = ">= 1.0" required_providers { aws = ">= 3.0" From 5253a640811cd5ddce41ac50f4a5f66d6c653c79 Mon Sep 17 00:00:00 2001 From: ralren Date: Thu, 8 Jun 2023 13:31:21 -0700 Subject: [PATCH 2/3] fix gha and pre commit config --- .github/workflows/validate.yml | 2 +- .pre-commit-config.yaml | 24 +++++++++++++++++++++--- README.md | 4 ++-- main.tf | 1 - 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index fac0b59..0421b55 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -10,4 +10,4 @@ on: jobs: validate: - uses: trussworks/shared-actions/.github/workflows/validate.yml@main + uses: trussworks/shared-actions/.github/workflows/validate-tf.yml@main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 393332d..bfd87bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.4.0 hooks: - id: check-json - id: check-merge-conflict @@ -10,13 +10,31 @@ repos: args: - --autofix - id: trailing-whitespace + - id: check-symlinks + - id: end-of-file-fixer + - id: mixed-line-ending + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.16 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-gfm + - mdformat-toc + # mdformat fights with terraform_docs + exclude: README.m(ark)?d(own)? - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.26.0 + rev: v0.33.0 hooks: - id: markdownlint + - repo: https://github.com/detailyang/pre-commit-shell + rev: 1.0.5 + hooks: + - id: shell-lint + - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.75.0 + rev: v1.77.1 hooks: - id: terraform_fmt diff --git a/README.md b/README.md index 9343188..fd12a48 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ module "rds-snapshot-cleaner" { } ``` - + ## Requirements | Name | Version | @@ -82,4 +82,4 @@ No modules. ## Outputs No outputs. - \ No newline at end of file + diff --git a/main.tf b/main.tf index e75d3e0..23f004e 100644 --- a/main.tf +++ b/main.tf @@ -160,4 +160,3 @@ resource "aws_lambda_function" "main" { Environment = var.environment } } - From 028ce0fc8bc0c0e1177756f4acc97d2d81315ed3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jun 2023 20:31:48 +0000 Subject: [PATCH 3/3] terraform-docs: automated action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fd12a48..8aecd9e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ module "rds-snapshot-cleaner" { | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13.0 | +| [terraform](#requirement\_terraform) | >= 1.0 | | [aws](#requirement\_aws) | >= 3.0 | ## Providers