Skip to content

Commit 61c8281

Browse files
authored
Merge pull request #13 from solutionDrive/add-root-block-device-config
Add root block device config
2 parents 0d5960b + 8b942c7 commit 61c8281

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

application_cluster/auto_scaling_group.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ resource "aws_launch_configuration" "application_cluster_appserver_launch_config
1010
lifecycle {
1111
create_before_destroy = true
1212
}
13+
14+
root_block_device {
15+
volume_type = "${var.root_block_device_volume_type}"
16+
volume_size = "${var.root_block_device_volume_size}"
17+
delete_on_termination = "${var.root_block_device_delete_on_termination}"
18+
encrypted = "${var.root_block_device_encrypted}"
19+
}
1320
}
1421

1522
resource "aws_autoscaling_group" "application_cluster_appserver_auto_scaling_group" {

application_cluster/variables.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,23 @@ variable "healthcheck_matcher" {
130130
description = "see https://www.terraform.io/docs/providers/aws/r/lb_target_group.html#matcher"
131131
default = "200"
132132
}
133+
134+
variable "root_block_device_volume_type" {
135+
description = "see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#block-devices"
136+
default = "standard"
137+
}
138+
139+
variable "root_block_device_volume_size" {
140+
description = "see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#block-devices"
141+
default = "50"
142+
}
143+
144+
variable "root_block_device_delete_on_termination" {
145+
description = "see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#block-devices"
146+
default = "true"
147+
}
148+
149+
variable "root_block_device_encrypted" {
150+
description = "see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#block-devices"
151+
default = "true"
152+
}

0 commit comments

Comments
 (0)