Skip to content

Commit

Permalink
Possibility to add additional ebs block devices to instances
Browse files Browse the repository at this point in the history
  • Loading branch information
iuriaranda committed Jun 9, 2017
1 parent ae146ad commit ba80ce5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module "bastion" {
* [`root_vl_size`]: String(optional)default 30. The size of the volume in gigabytes.
* [`root_vl_delete`]: Bool(optional)default true. Whether the volume should be destroyed on instance termination
* [`user_data`]: List(optional)default [""]. The user data to provide when launching the instance. If `instance_count` >1, each instance launched will use user_data with the corresponding `user_data[count.index]`
* [`ebs_block_devices`]: List(optional)default []. A list of objects defining `ebs_block_device`, as described in the terraform documentation: https://www.terraform.io/docs/providers/aws/r/instance.html#block-devices

### Output
* [`role_id`]: String: The ID of the role
Expand Down
2 changes: 2 additions & 0 deletions instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ resource "aws_instance" "instance" {
delete_on_termination = "${var.root_vl_delete}"
}

ebs_block_device = ["${var.ebs_block_devices}"]

tags {
Name = "${var.project}-${var.environment}-${var.name}${count.index + 1}"
Function = "${var.name}"
Expand Down
4 changes: 4 additions & 0 deletions instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ variable "tag_key" {
variable "tag_value" {
default = ""
}

variable "ebs_block_devices" {
default = []
}

0 comments on commit ba80ce5

Please sign in to comment.