Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 260274b

Browse files
author
Patrick Baxter
committed
hack/terraform-quickstart: allow instance_type configuration
1 parent d7bb34d commit 260274b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

hack/terraform-quickstart/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ provider "aws" {
66

77
resource "aws_instance" "bootstrap_node" {
88
ami = "${data.aws_ami.coreos_ami.image_id}"
9-
instance_type = "m3.medium"
9+
instance_type = "${var.instance_type}"
1010
key_name = "${var.ssh_key}"
1111
iam_instance_profile = "${aws_iam_instance_profile.bk_profile.id}"
1212

1313
tags {
1414
Name = "${var.instance_tags}"
1515
}
16+
1617
root_block_device {
1718
volume_type = "gp2"
1819
volume_size = "30"
@@ -21,7 +22,7 @@ resource "aws_instance" "bootstrap_node" {
2122

2223
resource "aws_instance" "worker_node" {
2324
ami = "${data.aws_ami.coreos_ami.image_id}"
24-
instance_type = "m3.medium"
25+
instance_type = "${var.instance_type}"
2526
key_name = "${var.ssh_key}"
2627
count = "${var.num_workers}"
2728
iam_instance_profile = "${aws_iam_instance_profile.bk_profile.id}"
@@ -38,7 +39,7 @@ resource "aws_instance" "worker_node" {
3839

3940
resource "aws_instance" "master_node" {
4041
ami = "${data.aws_ami.coreos_ami.image_id}"
41-
instance_type = "m3.medium"
42+
instance_type = "${var.instance_type}"
4243
key_name = "${var.ssh_key}"
4344
count = "${var.additional_masters}"
4445
iam_instance_profile = "${aws_iam_instance_profile.bk_profile.id}"

hack/terraform-quickstart/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ variable "instance_tags" {
1616
type = "string"
1717
}
1818

19+
variable "instance_type" {
20+
description = "Name all instances behind a single tag based on who/what is running terraform"
21+
type = "string"
22+
default = "m3.medium"
23+
}
24+
1925
variable "self_host_etcd" {
2026
type = "string"
2127
default = "true"

0 commit comments

Comments
 (0)