Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
enable sizing of ebs volume
Browse files Browse the repository at this point in the history
  • Loading branch information
jjno91 committed Nov 27, 2018
1 parent 72cc456 commit 9d44e1e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ resource "aws_launch_template" "this" {
vpc_security_group_ids = ["${aws_security_group.this.id}"]
tags = "${merge(map("Name", "${var.env}-ecs-windows"), var.tags)}"

block_device_mappings {
device_name = "${var.sized_block_device}"

ebs {
volume_size = "${var.ec2_disk_size}"
}
}

iam_instance_profile {
name = "${aws_iam_instance_profile.this.name}"
}
Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ variable "ami_name_filter" {
default = "Windows_Server-2016-English-Full-ECS_Optimized*"
}

variable "sized_block_device" {
description = "(optional) Name of the block device that the launch template will size"
default = "/dev/sda1"
}

variable "ec2_disk_size" {
description = "(optional) Size of the root volume for your EC2 container instances"
default = "50"
}

variable "min_size" {
description = "(optional) Minimum node count for ASG"
default = "2"
Expand Down

0 comments on commit 9d44e1e

Please sign in to comment.