Skip to content

Commit

Permalink
Parameterizing EBS Block device (#34)
Browse files Browse the repository at this point in the history
This should help help address #31
  • Loading branch information
tfhartmann authored Mar 21, 2018
1 parent 5d7a55e commit 9c91e91
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Module Input Variables
**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.

- `additional_user_data_script` - Additional `user_data` scripts content
- `ebs_block_device` - EBS block devices to attach to the instance. (default: /dev/xvdcz)
- `region` - AWS Region - defaults to us-east-1
- `servers` - Number of ECS Servers to start in the cluster - defaults to 1
- `min_servers` - Minimum number of ECS Servers to start in the cluster - defaults to 1
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "aws_launch_configuration" "ecs" {
associate_public_ip_address = "${var.associate_public_ip_address}"

ebs_block_device {
device_name = "/dev/xvdcz"
device_name = "${var.ebs_block_device}"
volume_size = "${var.docker_storage_size}"
volume_type = "gp2"
delete_on_termination = true
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ variable "enable_agents" {
description = "Enable Consul Agent and Registrator tasks on each ECS Instance"
}

variable "ebs_block_device" {
default = "/dev/xvdcz"
description = "EBS block devices to attach to the instance. (default: /dev/xvdcz)"
}

variable "extra_tags" {
default = []
}
Expand Down

0 comments on commit 9c91e91

Please sign in to comment.