Skip to content

This repo tests an AWS VPC with Localstack and Terratest

License

Notifications You must be signed in to change notification settings

jimsheldon/terraform-aws-network-example

Repository files navigation

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

About

This repo tests an AWS VPC with Localstack and Terratest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published