Skip to content

Commit

Permalink
Merge pull request #11 from unifio/upgrade-terraform
Browse files Browse the repository at this point in the history
Upgrade Terraform and file_template usage
  • Loading branch information
blakeneyops committed Dec 2, 2015
2 parents 942ffed + 1ee8d91 commit 9c3dbe0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased
## 0.1.1 (Dec 1, 2015)

#### FEATURES:
* Added support for assigning Elastic IP address to each NAT instance.
Expand All @@ -7,6 +7,7 @@
* Added support for VPC flow logs [GH-1]

#### IMPROVEMENTS:
* Updated template_file usage for 0.6.7 to remove deprecation warnings [GH-10]
* Replaced user_data template and parameters with generic user_data param.

## 0.1.0 (Oct 21, 2015)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Module stack that supports full AWS VPC deployment. Users can provision a basic
* DHCP Options Set
* Virtual Private Gateway creation

## Requirements ##

- Terraform 0.6.7 or newer
- AWS provider

## Base Module ##

The Base module provisions the VPC, attaches an Internet Gateway, and creates NAT Security Group, DMZ Routing table, and creates a CloudWatch group, IAM role, and AWS flow log. The flow log is configured to capture all traffic (ALLOW and DENY) over the entire VPC.
Expand Down
2 changes: 1 addition & 1 deletion az/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ resource "aws_instance" "nat" {
subnet_id = "${element(aws_subnet.dmz.*.id,count.index)}"
source_dest_check = false
user_data = "${var.user_data}"

tags {
Name = "${var.stack_item_label}-nat-${count.index}"
application = "${var.stack_item_fullname}"
managed_by = "terraform"
}
user_data = "${element(template_file.user_data.*.rendered, count.index)}"
}

resource "aws_eip" "nat_eip" {
Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
machine:
environment:
TF_VERSION: 0.6.6
TF_URL: https://dl.bintray.com/mitchellh/terraform/terraform_${TF_VERSION}_linux_amd64.zip
TF_VERSION: 0.6.7
TF_URL: https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip
dependencies:
pre:
- "[[ -f \"${HOME}/bin/terraform\" ]] || (wget -O \"/tmp/tf.zip\" \"${TF_URL}\" && unzip -o -d \"${HOME}/bin\" \"/tmp/tf.zip\")"
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module "vpc_base" {

## Generates instance user data from a template
resource "template_file" "user_data" {
filename = "../templates/user_data.tpl"
template = "${file("../templates/user_data.tpl")}"

vars {
hostname = "${var.stack_item_label}-example"
Expand Down
2 changes: 1 addition & 1 deletion examples/full_stack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module "vpc_vpg" {

## Generates instance user data from a template
resource "template_file" "user_data" {
filename = "../templates/user_data.tpl"
template = "${file("../templates/user_data.tpl")}"

vars {
hostname = "${var.stack_item_label}-example"
Expand Down

0 comments on commit 9c3dbe0

Please sign in to comment.