Skip to content

Commit

Permalink
Merge pull request #15 from trussworks/deprecate-terraform-versions
Browse files Browse the repository at this point in the history
deprecate older terraform versions
  • Loading branch information
ralren committed Jun 8, 2023
2 parents e7e81e3 + 028ce0f commit a2062e1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 21 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,14 +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_docs
- id: terraform_fmt
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -33,12 +28,12 @@ module "rds-snapshot-cleaner" {
}
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.0 |

## Providers
Expand Down Expand Up @@ -87,4 +82,4 @@ No modules.
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ resource "aws_lambda_function" "main" {
Environment = var.environment
}
}

2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0"

required_providers {
aws = ">= 3.0"
Expand Down

0 comments on commit a2062e1

Please sign in to comment.