Skip to content

Commit

Permalink
feat: Support throughput param for gp3 volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
sidprak committed Dec 14, 2020
1 parent e4520d2 commit ae6c425
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ locals {
root_volume_size = "100" # root volume size of workers instances.
root_volume_type = "gp2" # root volume type of workers instances, can be 'standard', 'gp2', or 'io1'
root_iops = "0" # The amount of provisioned IOPS. This must be set with a volume_type of "io1".
root_volume_throughput = "0" # The amount of throughput to provision for a gp3 volume.
key_name = "" # The key pair name that should be used for the instances in the autoscaling group
pre_userdata = "" # userdata to pre-append to the default userdata.
userdata_template_file = "" # alternate template to use for userdata
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.12.9, != 0.13.0"

required_providers {
aws = ">= 3.3.0"
aws = ">= 3.21.0"
local = ">= 1.4"
null = ">= 2.1"
template = ">= 2.1"
Expand Down
10 changes: 10 additions & 0 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ resource "aws_launch_template" "workers_launch_template" {
"root_iops",
local.workers_group_defaults["root_iops"],
)
throughput = lookup(
var.worker_groups_launch_template[count.index],
"root_volume_throughput",
local.workers_group_defaults["root_volume_throughput"],
)
encrypted = lookup(
var.worker_groups_launch_template[count.index],
"root_encrypted",
Expand Down Expand Up @@ -414,6 +419,11 @@ resource "aws_launch_template" "workers_launch_template" {
"iops",
local.workers_group_defaults["root_iops"],
)
throughput = lookup(
block_device_mappings.value,
"throughput",
local.workers_group_defaults["root_volume_throughput"],
)
encrypted = lookup(
block_device_mappings.value,
"encrypted",
Expand Down

0 comments on commit ae6c425

Please sign in to comment.