Skip to content

Commit

Permalink
Switch to gp3 for default instance type
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomationD committed Jan 19, 2025
1 parent 29139a5 commit 404ede2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ resource "aws_instance" "this" {
volume_size = var.disk_size
}

// TODO: Add secondary conditional volume
}

module "asg_bastion" {
Expand Down Expand Up @@ -95,6 +96,15 @@ module "asg_bastion" {
}
},

var.external_ebs_volume_id != "" ? {
device_name = "/dev/sdh"
no_device = 0
ebs = {
delete_on_termination = false
encrypted = true
volume_id = var.external_ebs_volume_id
}
} : null
]

capacity_reservation_specification = {
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,11 @@ variable "disk_size" {
variable "disk_type" {
type = string
description = "Disk type for the bastion host"
default = "gp2"
default = "gp3"
}

variable "external_ebs_volume_id" {
type = string
description = "External EBS volume ID to attach to the bastion host"
default = ""
}

0 comments on commit 404ede2

Please sign in to comment.