Skip to content

Commit 9c91e91

Browse files
authored
Parameterizing EBS Block device (#34)
This should help help address #31
1 parent 5d7a55e commit 9c91e91

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Module Input Variables
2222
**NOTE About User Data:** The `user_data` parameter overwrites the `user_data` template used by this module, this will break some of the module features (e.g. `docker_storage_size`, `dockerhub_token`, and `dockerhub_email`). However, `additional_user_data_script` will concatenate additional data to the end of the current `user_data` script. It is recomended that you use `additional_user_data_script`. These two parameters are mutually exclusive - you can not pass both into this module and expect it to work.
2323

2424
- `additional_user_data_script` - Additional `user_data` scripts content
25+
- `ebs_block_device` - EBS block devices to attach to the instance. (default: /dev/xvdcz)
2526
- `region` - AWS Region - defaults to us-east-1
2627
- `servers` - Number of ECS Servers to start in the cluster - defaults to 1
2728
- `min_servers` - Minimum number of ECS Servers to start in the cluster - defaults to 1

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "aws_launch_configuration" "ecs" {
3838
associate_public_ip_address = "${var.associate_public_ip_address}"
3939

4040
ebs_block_device {
41-
device_name = "/dev/xvdcz"
41+
device_name = "${var.ebs_block_device}"
4242
volume_size = "${var.docker_storage_size}"
4343
volume_type = "gp2"
4444
delete_on_termination = true

variables.tf

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ variable "enable_agents" {
5050
description = "Enable Consul Agent and Registrator tasks on each ECS Instance"
5151
}
5252

53+
variable "ebs_block_device" {
54+
default = "/dev/xvdcz"
55+
description = "EBS block devices to attach to the instance. (default: /dev/xvdcz)"
56+
}
57+
5358
variable "extra_tags" {
5459
default = []
5560
}

0 commit comments

Comments
 (0)