Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.02 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.02 KB

Terraform AWS Network Example

Based on terraform-aws-network-example.

This example Terraform module creates a basic AWS network.

Terratest and Terraform CLI tests check for:

  • VPC ID prefix starts with vpc-
  • NAT EIP Name tag matches tag_name

Tests are run under continuous integration using Localstack and Drone CI or Harness CI.

Run Tests Locally

Start Localstack docker container

docker run --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:1.2.0

Run Terratest tests

cd test
go test -v -run TestTerraformAwsNetworkExample

Run Terraform CLI tests

cp tests/aws-provider-localstack.tf tests/example/test-provider.tf
terraform test