Permalink
Browse files

Add a lab terraform environment

Test that network module has no hidden ordering dependencies.
GH-101 fixed ordering dependencies in VPC endpoint creation.
The lab validates that a new VPC can be spun up from scratch
cleanly.

Fixes GH-78.
  • Loading branch information...
lopopolo committed Nov 12, 2018
1 parent 9095261 commit f8fe09f9bf30864ed5a814fdbb7116ca3d279bad
Showing with 52 additions and 0 deletions.
  1. +8 −0 terraform/lab/README.md
  2. +8 −0 terraform/lab/aws.tf
  3. +36 −0 terraform/lab/main.tf
@@ -0,0 +1,8 @@
## Lab environment

The lab environment is intended to be a cleanroom for testing terraform
configuration and experimenting with new setups without affecting production
environments like `app-prod-pdx`.

One use of the lab is to ensure that terraform modules have no hidden
dependencies and can come up cleanly from an empty state.
@@ -0,0 +1,8 @@
variable "region" {
default = "us-west-2"
}

provider "aws" {
region = "${var.region}"
version = "~> 1.42"
}
@@ -0,0 +1,36 @@
variable "name" {
default = "lab"
}

variable "env" {
default = "stage"
}

variable "vpc_cidr" {
default = "10.111.0.0/16"
}

variable "azs" {
default = "us-west-2a,us-west-2b,us-west-2c"
}

terraform {
required_version = "> 0.9.7"

backend "s3" {
bucket = "hyperbola-terraform-state"
region = "us-east-1"
key = "terraform/lab/terraform.tfstate"
encrypt = true
dynamodb_table = "terraform_statelock"
}
}

module "network" {
source = "../modules/aws/network"
name = "${var.name}"
vpc_cidr = "${var.vpc_cidr}"
azs = "${var.azs}"
nat_enabled = "false"
region = "${var.region}"
}

0 comments on commit f8fe09f

Please sign in to comment.