Skip to content

Commit 6d85360

Browse files
Merge pull request #39 from DNXLabs/creating_volumetype
Creating volume type variable
2 parents f968498 + 2e2a563 commit 6d85360

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ module "ecs_apps" {
121121
| target\_group\_arns | List of target groups for ASG to register. | `list(string)` | `[]` | no |
122122
| throughput\_mode | Throughput mode for the file system. Defaults to bursting. Valid values: bursting, provisioned. | `string` | `"bursting"` | no |
123123
| userdata | Extra commands to pass to userdata. | `string` | `""` | no |
124+
| volume\_type | The EBS volume type | `string` | `"gp2"` | no |
124125
| vpc\_id | VPC ID to deploy the ECS cluster. | `any` | n/a | yes |
125126
| vpn\_cidr | Cidr of VPN to grant ssh access to ECS nodes | `list` | <pre>[<br> "10.37.0.0/16"<br>]</pre> | no |
126127
| wafv2\_enable | Deploys WAF V2 with Managed rule groups | `bool` | `false` | no |

_variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ variable "architecture" {
1414
default = "x86_64"
1515
description = "Architecture to select the AMI, x86_64 or arm64"
1616
}
17+
variable "volume_type" {
18+
default = "gp2"
19+
description = "The EBS volume type"
20+
}
1721

1822
variable "on_demand_percentage" {
1923
description = "Percentage of on-demand intances vs spot."

ec2-launch-template.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ resource "aws_launch_template" "ecs" {
2525
ebs {
2626
volume_size = var.instance_volume_size
2727
encrypted = true
28+
volume_type = var.volume_type
2829
kms_key_id = var.ebs_key_arn != "" ? var.ebs_key_arn : null
2930
}
3031
}

0 commit comments

Comments
 (0)