Skip to content

Instantly share code, notes, and snippets.

@swade1987
Created February 4, 2016 01:32
Show Gist options
  • Save swade1987/1a739334811b32dcc7a8 to your computer and use it in GitHub Desktop.
Save swade1987/1a739334811b32dcc7a8 to your computer and use it in GitHub Desktop.
bamboo - main.tf
provider "aws" {
region = "${var.aws_region}"
}
module "base" {
source = "../base"
}
resource "aws_security_group" "core-services" {
name = "core-services"
description = "Core Services Security Group"
vpc_id = "${module.base.default_vpc_id}"
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
resource "aws_instance" "bamboo-server" {
instance_type = "m3.large"
ami = "${lookup(var.aws_amis, var.aws_region)}"
key_name = "${var.key_name}"
subnet_id = "${module.base.default_subnet_id}"
vpc_security_group_ids = ["${module.base.default_security_group_id}", "${module.base.external_connections_security_group_id}"]
tags {
Name = "bamboo-server"
}
provisioner "chef" {
environment = "_default"
run_list = ["bamboo::server"]
node_name = "bamboo-server"
server_url = "https://ec2-52-25-123-105.us-west-2.compute.amazonaws.com/organizations/parliamentary-digital-service"
validation_client_name = "parliamentary-digital-service-validator"
validation_key = "${file("parliamentary-digital-service-validator.pem")}"
ssl_verify_mode = "verify:none"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment