Sha256: eb7ae7c95c430871ee43fc5b6e7ec5b73ca6f1564331d43d1f7901661b9678f7

Contents?: true

Size: 815 Bytes

Versions: 3

Compression:

Stored size: 815 Bytes

Contents

# Specify the provider and access details
provider "aws" {
  region = "${var.region}"
  access_key = "${var.access_key}"
  secret_key = "${var.secret_key}"
}

resource "aws_key_pair" "platform_key" {
  key_name   = "${var.keypair_name}"
  public_key = "${file("${var.public_key}")}"
}

resource "aws_instance" "bastion" {
  ami = "${lookup(var.aws_amis, var.region)}"
  instance_type = "t2.small"
  key_name = "${var.keypair_name}"

  vpc_security_group_ids = ["${aws_security_group.bastion_sg.id}"]
  subnet_id = <%= "\"#{conditional_subnet_id(@values)}\"" %>
  associate_public_ip_address = true

  tags {
    Name = "bastion"
  }

  connection {
    user = "ubuntu"
    private_key = "${file(var.private_key)}"
  }

  provisioner "remote-exec" {
    inline = [
      "curl -fsSL get.docker.com | sh"
    ]
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kite-0.2.0 tpl/aws/terraform/main.tf.tt
kite-0.1.0 tpl/aws/terraform/main.tf.tt
kite-0.0.9 tpl/aws/terraform/main.tf.tt