Skip to content

Commit af1a7e3

Browse files
committed
feat: Add support for storage_throughput
AWS recently [added support for `gp3` storage type][1], and Terraform AWS provider [implemented][2] this functionality as well in version 4.45.0. Closes terraform-aws-modules#452 [1]: https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-general-purpose-gp3-storage-volumes/ [2]: hashicorp/terraform-provider-aws#27670
1 parent 0631db0 commit af1a7e3

File tree

35 files changed

+61
-45
lines changed

35 files changed

+61
-45
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Users have the ability to:
209209
| Name | Version |
210210
|------|---------|
211211
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
212-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
212+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
213213
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1 |
214214

215215
## Providers
@@ -314,7 +314,8 @@ Users have the ability to:
314314
| <a name="input_skip_final_snapshot"></a> [skip\_final\_snapshot](#input\_skip\_final\_snapshot) | Determines whether a final DB snapshot is created before the DB instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB snapshot is created before the DB instance is deleted | `bool` | `false` | no |
315315
| <a name="input_snapshot_identifier"></a> [snapshot\_identifier](#input\_snapshot\_identifier) | Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05 | `string` | `null` | no |
316316
| <a name="input_storage_encrypted"></a> [storage\_encrypted](#input\_storage\_encrypted) | Specifies whether the DB instance is encrypted | `bool` | `true` | no |
317-
| <a name="input_storage_type"></a> [storage\_type](#input\_storage\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not | `string` | `null` | no |
317+
| <a name="input_storage_throughput"></a> [storage\_throughput](#input\_storage\_throughput) | Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type. | `number` | `null` | no |
318+
| <a name="input_storage_type"></a> [storage\_type](#input\_storage\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), 'gp3' (new generation of general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not. If you specify 'io1' or 'gp3' , you must also include a value for the 'iops' parameter | `string` | `null` | no |
318319
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | A list of VPC subnet IDs | `list(string)` | `[]` | no |
319320
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no |
320321
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `map(string)` | `{}` | no |

examples/complete-mssql/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
3030

3131
## Modules
3232

examples/complete-mssql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/complete-mysql/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

examples/complete-mysql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/complete-oracle/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
3030

3131
## Modules
3232

examples/complete-oracle/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/complete-postgres/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
3030

3131
## Modules
3232

examples/complete-postgres/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/cross-region-replica-postgres/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
3030

3131
## Modules
3232

examples/cross-region-replica-postgres/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/enhanced-monitoring/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
3232

3333
## Modules
3434

examples/enhanced-monitoring/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/groups/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

examples/groups/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/replica-mysql/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

examples/replica-mysql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/replica-postgres/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
2424

2525
## Providers
2626

examples/replica-postgres/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

examples/s3-import-mysql/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ Note that this example may create resources which cost money. Run `terraform des
4949
| Name | Version |
5050
|------|---------|
5151
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
52-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
52+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
5353
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1 |
5454

5555
## Providers
5656

5757
| Name | Version |
5858
|------|---------|
59-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
59+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
6060
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.1 |
6161

6262
## Modules

examples/s3-import-mysql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99

1010
random = {

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ module "db_instance" {
9999
availability_zone = var.availability_zone
100100
multi_az = var.multi_az
101101
iops = var.iops
102+
storage_throughput = var.storage_throughput
102103
publicly_accessible = var.publicly_accessible
103104
ca_cert_identifier = var.ca_cert_identifier
104105

modules/db_instance/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
| Name | Version |
77
|------|---------|
88
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
9-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
1010
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1 |
1111

1212
## Providers
1313

1414
| Name | Version |
1515
|------|---------|
16-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
16+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
1717
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.1 |
1818

1919
## Modules
@@ -91,7 +91,8 @@ No modules.
9191
| <a name="input_skip_final_snapshot"></a> [skip\_final\_snapshot](#input\_skip\_final\_snapshot) | Determines whether a final DB snapshot is created before the DB instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB snapshot is created before the DB instance is deleted | `bool` | `false` | no |
9292
| <a name="input_snapshot_identifier"></a> [snapshot\_identifier](#input\_snapshot\_identifier) | Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05. | `string` | `null` | no |
9393
| <a name="input_storage_encrypted"></a> [storage\_encrypted](#input\_storage\_encrypted) | Specifies whether the DB instance is encrypted | `bool` | `true` | no |
94-
| <a name="input_storage_type"></a> [storage\_type](#input\_storage\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | `string` | `null` | no |
94+
| <a name="input_storage_throughput"></a> [storage\_throughput](#input\_storage\_throughput) | Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type. | `number` | `null` | no |
95+
| <a name="input_storage_type"></a> [storage\_type](#input\_storage\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), 'gp3' (new generation of general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not. If you specify 'io1' or 'gp3' , you must also include a value for the 'iops' parameter | `string` | `null` | no |
9596
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no |
9697
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `map(string)` | `{}` | no |
9798
| <a name="input_timezone"></a> [timezone](#input\_timezone) | Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information. | `string` | `null` | no |

modules/db_instance/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ resource "aws_db_instance" "this" {
6161
availability_zone = var.availability_zone
6262
multi_az = var.multi_az
6363
iops = var.iops
64+
storage_throuhghput = var.storage_throuhghput
6465
publicly_accessible = var.publicly_accessible
6566
ca_cert_identifier = var.ca_cert_identifier
6667

modules/db_instance/variables.tf

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ variable "allocated_storage" {
2222
}
2323

2424
variable "storage_type" {
25-
description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'."
25+
description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), 'gp3' (new generation of general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not. If you specify 'io1' or 'gp3' , you must also include a value for the 'iops' parameter"
2626
type = string
2727
default = null
2828
}
2929

30+
variable "storage_throughput" {
31+
description = "Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type."
32+
type = number
33+
default = null
34+
}
35+
3036
variable "storage_encrypted" {
3137
description = "Specifies whether the DB instance is encrypted"
3238
type = bool

modules/db_instance/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99

1010
random = {

modules/db_instance_automated_backups_replication/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

modules/db_option_group/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
| Name | Version |
77
|------|---------|
88
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
9-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
1010

1111
## Providers
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
15+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
1616

1717
## Modules
1818

modules/db_option_group/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

modules/db_parameter_group/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
| Name | Version |
77
|------|---------|
88
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
9-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
1010

1111
## Providers
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
15+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
1616

1717
## Modules
1818

modules/db_parameter_group/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

modules/db_subnet_group/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
| Name | Version |
77
|------|---------|
88
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
9-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.28 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.45 |
1010

1111
## Providers
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.28 |
15+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.45 |
1616

1717
## Modules
1818

modules/db_subnet_group/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.28"
7+
version = ">= 4.45"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)