Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
feat: upgrade terraform aws provider (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ridehalgh authored Dec 14, 2020
1 parent 6752821 commit 3072178
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
run: |
pip install pre-commit
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
env GO111MODULE=on go get -u github.com/liamg/tfsec/cmd/tfsec && go get github.com/segmentio/[email protected]
curl -L "$(curl -s https://api.github.com/repos/tfsec/tfsec/releases/latest | grep -o -E "https://.+?tfsec-linux-amd64")" > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/tags/v0.9.1 | grep -o -E "https://.+?-linux-amd64")" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
pre-commit install
pre-commit install-hooks
- name: Run pre-commit tests
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
run: |
pip install pre-commit
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
env GO111MODULE=on go get -u github.com/liamg/tfsec/cmd/tfsec && go get github.com/segmentio/[email protected]
curl -L "$(curl -s https://api.github.com/repos/tfsec/tfsec/releases/latest | grep -o -E "https://.+?tfsec-linux-amd64")" > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/tags/v0.9.1 | grep -o -E "https://.+?-linux-amd64")" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
pre-commit install
pre-commit install-hooks
- name: Run pre-commit tests
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v3.3.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand All @@ -13,7 +13,7 @@ repos:
args:
- --allow-missing-credentials
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.31.0
rev: v1.45.0
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ module "example_module_test" {
| Name | Version |
|------|---------|
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| aws | >= 3.0 |
| local | 1.4.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.0 |
| aws | >= 3.0 |
| local | 1.4.0 |

## Inputs
Expand Down
2 changes: 1 addition & 1 deletion iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data "aws_iam_policy_document" "lambda" {
]

resources = [
aws_cloudwatch_log_group.lambda_log_group.arn
format("%s:*", aws_cloudwatch_log_group.lambda_log_group.arn)
]
}

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "aws_lambda_function" "draining_lambda" {
}

filename = data.local_file.lambda_zip.filename
source_code_hash = data.local_file.lambda_zip.content_base64
source_code_hash = filebase64sha256(data.local_file.lambda_zip.filename)

tags = var.tags
}
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
version = ">= 3.0"
}
local = {
source = "hashicorp/local"
Expand Down

0 comments on commit 3072178

Please sign in to comment.