Skip to content

Commit

Permalink
Add the instance_key as a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lox committed Sep 6, 2018
1 parent 225b9c5 commit a74e105
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 a74e105

Please sign in to comment.