Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Terraform deployment code, using nubis-terraform modules #53

Merged
merged 1 commit into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" {}