Skip to content

Commit

Permalink
add EBS volume type support (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarciso4 authored May 8, 2024
1 parent 80b7481 commit ed77ff1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ resource "aws_launch_template" "cluster" {
key_name = var.ssh_key_name
instance_initiated_shutdown_behavior = "terminate"

block_device_mappings {
device_name = "/dev/xvda"

ebs {
volume_type = var.volume_type
}
}

iam_instance_profile {
name = aws_iam_instance_profile.cluster-ec2-role.id
}
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ variable "instance_type" {
description = "instance type"
}

variable "volume_type" {
description = "volume type"
default = "gp2"
}

variable "ssh_key_name" {
description = "ssh key name"
}
Expand Down

0 comments on commit ed77ff1

Please sign in to comment.