Skip to content

Commit

Permalink
Gp3 support (#8)
Browse files Browse the repository at this point in the history
* add iops/throughput volume settings
  • Loading branch information
dgoodellrhy authored Apr 28, 2022
1 parent 7994440 commit 80bdf1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ resource "aws_instance" "instance" {
root_block_device {
delete_on_termination = true
encrypted = true
iops = var.volume_iops
throughput = var.volume_throughput
volume_size = var.volume_size
volume_type = var.volume_type
}
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ variable "userdata_script" {
default = null
}

variable "volume_iops" {
default = null
description = "IOPS to allocate to the instance's base drive. Only applicable when volume_type is io1, io2 or gp3."
type = number
}

variable "volume_size" {
description = "Size of the attached volume for this instance."
type = number
Expand All @@ -105,6 +111,12 @@ variable "volume_type" {
type = string
}

variable "volume_throughput" {
default = null
description = "Value in MiB/s for throughput on instance volume. Only applicable when volume_type is gp3."
type = number
}

variable "vpc" {
description = "VPC ID to create the instance in."
type = string
Expand Down

0 comments on commit 80bdf1b

Please sign in to comment.