Skip to content

Commit

Permalink
Merge pull request #7 from vtstanescu/feat/update-aws-provider-min-ve…
Browse files Browse the repository at this point in the history
…rsion

aws-vpc: update aws provider minimum version to v5.
* replace vpc attribute with domain for aws_eip resource.
* update Go version for test module to 1.19, up from 1.18.
* ignore tfsec check for VPC flow logs.
  • Loading branch information
vtstanescu committed Apr 13, 2024
2 parents 48f60d7 + 310e046 commit dac54ff
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: test/go.mod
- uses: hashicorp/setup-terraform@v2
- uses: terraform-linters/setup-tflint@v1
- uses: hashicorp/setup-terraform@v3
- uses: terraform-linters/setup-tflint@v4

- name: Terraform validate & format
run: |
Expand All @@ -24,7 +24,7 @@ jobs:
- name: tflint
run: |
tflint .
tflint
- name: tfsec
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion config.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 = ">= 4.0"
version = ">= 5.0"
}
}
}
2 changes: 1 addition & 1 deletion module-test/provider.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 = ">= 4.0"
version = ">= 5.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/public-infra/nat_gateways.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_eip" "nat" {

for_each = toset(local.nat_gateway_azs)

vpc = true
domain = "vpc"

tags = merge(var.tags, { Name = "${var.vpc.name}-nat-eip-${each.value}" })
}
Expand Down
2 changes: 1 addition & 1 deletion test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vtstanescu/aws-vpc

go 1.18
go 1.19

require (
github.com/gruntwork-io/terratest v0.40.10
Expand Down
1 change: 1 addition & 0 deletions vpc.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#tfsec:ignore:aws-ec2-require-vpc-flow-logs-for-all-vpcs
resource "aws_vpc" "vpc" {
cidr_block = var.main_cidr_block

Expand Down

0 comments on commit dac54ff

Please sign in to comment.