Skip to content

Commit

Permalink
Merge pull request #43 from buildkite/add-terraform-keypair-as-var
Browse files Browse the repository at this point in the history
Add the instance_key as a variable in terraform
  • Loading branch information
lox authored Sep 6, 2018
2 parents 225b9c5 + a74e105 commit 4532ace
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion terraform/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ data "aws_ami" "linux2" {
}
}

variable "instance_key" {
description = "Name of EC2 Keypair"
default = "lifecycled-example"
}

module "example" {
source = "modules/example"

Expand All @@ -51,7 +56,7 @@ module "example" {
instance_ami = "${data.aws_ami.linux2.id}"
instance_count = "1"
instance_type = "t3.micro"
instance_key = "lifecycled-example"
instance_key = "${var.instance_key}"

binary_path = "../build/lifecycled-linux-amd64"

Expand Down

0 comments on commit 4532ace

Please sign in to comment.