Skip to content

Commit

Permalink
Merge pull request #53 from gozer/master
Browse files Browse the repository at this point in the history
Add Terraform deployment code, using nubis-terraform modules
  • Loading branch information
tinnightcap authored Sep 12, 2016
2 parents 849c80c + 8f9c01f commit cd471db
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ nubis/librarian-puppet
nubis/Puppetfile.lock
nubis/.tmp
nubis/.librarian
nubis/terraform/terraform.tfstate*
nubis/terraform/.terraform
26 changes: 26 additions & 0 deletions nubis/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module "worker" {
source = "github.com/nubisproject/nubis-terraform//worker?ref=master"
region = "${var.region}"
environment = "${var.environment}"
account = "${var.account}"
service_name = "${var.service_name}"
ami = "${var.ami}"
elb = "${module.load_balancer.name}"
}

module "load_balancer" {
source = "github.com/nubisproject/nubis-terraform//load_balancer?ref=master"
region = "${var.region}"
environment = "${var.environment}"
account = "${var.account}"
service_name = "${var.service_name}"
}

module "dns" {
source = "github.com/nubisproject/nubis-terraform//dns?ref=master"
region = "${var.region}"
environment = "${var.environment}"
account = "${var.account}"
service_name = "${var.service_name}"
target = "${module.load_balancer.address}"
}
5 changes: 5 additions & 0 deletions nubis/terraform/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
output "address" {
value = "https://${module.dns.fqdn}/"
}


4 changes: 4 additions & 0 deletions nubis/terraform/terraform.tfvars-dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
account = "<some account name>"
region = "<some aws region name>"
environment = "<stage/prod>"
service_name = "nubis-skel"
15 changes: 15 additions & 0 deletions nubis/terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "account" {}

variable "region" {
default = "us-west-2"
}

variable "environment" {
default = "stage"
}

variable "service_name" {
default = "skel"
}

variable "ami" {}

0 comments on commit cd471db

Please sign in to comment.