Created
February 4, 2016 01:32
-
-
Save swade1987/1a739334811b32dcc7a8 to your computer and use it in GitHub Desktop.
bamboo - main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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