Skip to content

Commit

Permalink
Merge pull request #15 from getndazn/ebs-size
Browse files Browse the repository at this point in the history
Enable setting EBS size for bastion instance
  • Loading branch information
Michał Wieczorek authored Aug 3, 2020
2 parents 7d854d0 + 2ef9e82 commit 22ca205
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG/2020-08-03-ebs-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- type: changed
m: Enable setting EBS size for bastion instance
jira: PLAT-5131
owner: mwieczorek
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ resource "aws_launch_template" "bastion-service-host" {
)
}

block_device_mappings {
device_name = var.bastion_ebs_device_name

ebs {
volume_size = var.bastion_ebs_size
volume_type = "gp2"
delete_on_termination = "true"
}
}

lifecycle {
create_before_destroy = true
}
Expand Down
12 changes: 11 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,15 @@ variable "on_demand_base_capacity" {

variable "delete_network_interface_on_termination" {
description = "if network interface created for bastion host should be deleted when instance in terminated. Setting propagated to aws_launch_template.network_interfaces.delete_on_termination"
default = true
default = true
}

variable "bastion_ebs_size" {
description = "Size of EBS attached to the bastion instance"
default = 8
}

variable "bastion_ebs_device_name" {
description = "Name of bastion instance block device"
default = "/dev/xvda"
}

0 comments on commit 22ca205

Please sign in to comment.