Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for throughput parameter for gp3 volumes #1146

Merged
merged 5 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ MIT Licensed. See [LICENSE](https:/terraform-aws-modules/terraform-a
| Name | Version |
|------|---------|
| terraform | >= 0.12.9, != 0.13.0 |
| aws | >= 3.3.0 |
| aws | >= 3.21.0 |
| kubernetes | >= 1.11.1 |
| local | >= 1.4 |
| null | >= 2.1 |
Expand All @@ -156,7 +156,7 @@ MIT Licensed. See [LICENSE](https:/terraform-aws-modules/terraform-a

| Name | Version |
|------|---------|
| aws | >= 3.3.0 |
| aws | >= 3.21.0 |
| kubernetes | >= 1.11.1 |
| local | >= 1.4 |
| null | >= 2.1 |
Expand Down
1 change: 1 addition & 0 deletions local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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 = null # 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 @@ -384,6 +384,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 @@ -419,6 +424,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