diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74f3751c..d5886a6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.76.0 + rev: v1.77.0 hooks: - id: terraform_fmt - id: terraform_validate @@ -23,7 +23,7 @@ repos: - '--args=--only=terraform_standard_module_structure' - '--args=--only=terraform_workspace_remote' - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-merge-conflict - id: end-of-file-fixer diff --git a/README.md b/README.md index 4bfad3c9..7388fd81 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ Users have the ability to: | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | | [random](#requirement\_random) | >= 3.1 | ## Providers @@ -314,7 +314,8 @@ Users have the ability to: | [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 | | [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 | | [storage\_encrypted](#input\_storage\_encrypted) | Specifies whether the DB instance is encrypted | `bool` | `true` | no | -| [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 | +| [storage\_throughput](#input\_storage\_throughput) | Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type. | `number` | `null` | no | +| [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 | | [subnet\_ids](#input\_subnet\_ids) | A list of VPC subnet IDs | `list(string)` | `[]` | no | | [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no | | [timeouts](#input\_timeouts) | Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `map(string)` | `{}` | no | diff --git a/examples/complete-mssql/README.md b/examples/complete-mssql/README.md index 1dca7ab2..b6ff1cac 100644 --- a/examples/complete-mssql/README.md +++ b/examples/complete-mssql/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/examples/complete-mssql/versions.tf b/examples/complete-mssql/versions.tf index b3526af1..325eee94 100644 --- a/examples/complete-mssql/versions.tf +++ b/examples/complete-mssql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/complete-mysql/README.md b/examples/complete-mysql/README.md index 0fbc8103..93cba2bb 100644 --- a/examples/complete-mysql/README.md +++ b/examples/complete-mysql/README.md @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers diff --git a/examples/complete-mysql/versions.tf b/examples/complete-mysql/versions.tf index b3526af1..325eee94 100644 --- a/examples/complete-mysql/versions.tf +++ b/examples/complete-mysql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/complete-oracle/README.md b/examples/complete-oracle/README.md index a75b0941..be73c166 100644 --- a/examples/complete-oracle/README.md +++ b/examples/complete-oracle/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/examples/complete-oracle/versions.tf b/examples/complete-oracle/versions.tf index b3526af1..325eee94 100644 --- a/examples/complete-oracle/versions.tf +++ b/examples/complete-oracle/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/complete-postgres/README.md b/examples/complete-postgres/README.md index 695160f9..7adfa373 100644 --- a/examples/complete-postgres/README.md +++ b/examples/complete-postgres/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/examples/complete-postgres/versions.tf b/examples/complete-postgres/versions.tf index b3526af1..325eee94 100644 --- a/examples/complete-postgres/versions.tf +++ b/examples/complete-postgres/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/cross-region-replica-postgres/README.md b/examples/cross-region-replica-postgres/README.md index ee49a49c..93cf572b 100644 --- a/examples/cross-region-replica-postgres/README.md +++ b/examples/cross-region-replica-postgres/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/examples/cross-region-replica-postgres/versions.tf b/examples/cross-region-replica-postgres/versions.tf index b3526af1..325eee94 100644 --- a/examples/cross-region-replica-postgres/versions.tf +++ b/examples/cross-region-replica-postgres/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/enhanced-monitoring/README.md b/examples/enhanced-monitoring/README.md index d210955c..83fbebbd 100644 --- a/examples/enhanced-monitoring/README.md +++ b/examples/enhanced-monitoring/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/examples/enhanced-monitoring/versions.tf b/examples/enhanced-monitoring/versions.tf index b3526af1..325eee94 100644 --- a/examples/enhanced-monitoring/versions.tf +++ b/examples/enhanced-monitoring/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/groups/README.md b/examples/groups/README.md index 9a000e8a..e3702955 100644 --- a/examples/groups/README.md +++ b/examples/groups/README.md @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers diff --git a/examples/groups/versions.tf b/examples/groups/versions.tf index b3526af1..325eee94 100644 --- a/examples/groups/versions.tf +++ b/examples/groups/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/replica-mysql/README.md b/examples/replica-mysql/README.md index cff17d47..ff002e47 100644 --- a/examples/replica-mysql/README.md +++ b/examples/replica-mysql/README.md @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers diff --git a/examples/replica-mysql/versions.tf b/examples/replica-mysql/versions.tf index b3526af1..325eee94 100644 --- a/examples/replica-mysql/versions.tf +++ b/examples/replica-mysql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/replica-postgres/README.md b/examples/replica-postgres/README.md index 0d436dc2..304eefb1 100644 --- a/examples/replica-postgres/README.md +++ b/examples/replica-postgres/README.md @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers diff --git a/examples/replica-postgres/versions.tf b/examples/replica-postgres/versions.tf index b3526af1..325eee94 100644 --- a/examples/replica-postgres/versions.tf +++ b/examples/replica-postgres/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/examples/s3-import-mysql/README.md b/examples/s3-import-mysql/README.md index f90572e7..da137642 100644 --- a/examples/s3-import-mysql/README.md +++ b/examples/s3-import-mysql/README.md @@ -49,14 +49,14 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | | [random](#requirement\_random) | >= 3.1 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | | [random](#provider\_random) | >= 3.1 | ## Modules diff --git a/examples/s3-import-mysql/versions.tf b/examples/s3-import-mysql/versions.tf index e511e534..2ec0854b 100644 --- a/examples/s3-import-mysql/versions.tf +++ b/examples/s3-import-mysql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } random = { diff --git a/main.tf b/main.tf index 75a2948f..2b8732d0 100644 --- a/main.tf +++ b/main.tf @@ -99,6 +99,7 @@ module "db_instance" { availability_zone = var.availability_zone multi_az = var.multi_az iops = var.iops + storage_throughput = var.storage_throughput publicly_accessible = var.publicly_accessible ca_cert_identifier = var.ca_cert_identifier diff --git a/modules/db_instance/README.md b/modules/db_instance/README.md index 72633fe1..04606a0b 100644 --- a/modules/db_instance/README.md +++ b/modules/db_instance/README.md @@ -6,14 +6,14 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | | [random](#requirement\_random) | >= 3.1 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | | [random](#provider\_random) | >= 3.1 | ## Modules @@ -91,7 +91,8 @@ No modules. | [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 | | [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 | | [storage\_encrypted](#input\_storage\_encrypted) | Specifies whether the DB instance is encrypted | `bool` | `true` | no | -| [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 | +| [storage\_throughput](#input\_storage\_throughput) | Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type. | `number` | `null` | no | +| [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 | | [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no | | [timeouts](#input\_timeouts) | Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `map(string)` | `{}` | no | | [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 | diff --git a/modules/db_instance/main.tf b/modules/db_instance/main.tf index 953af901..9deeae2d 100644 --- a/modules/db_instance/main.tf +++ b/modules/db_instance/main.tf @@ -61,6 +61,7 @@ resource "aws_db_instance" "this" { availability_zone = var.availability_zone multi_az = var.multi_az iops = var.iops + storage_throughput = var.storage_throughput publicly_accessible = var.publicly_accessible ca_cert_identifier = var.ca_cert_identifier diff --git a/modules/db_instance/variables.tf b/modules/db_instance/variables.tf index c2e6198e..cddf7756 100644 --- a/modules/db_instance/variables.tf +++ b/modules/db_instance/variables.tf @@ -22,11 +22,17 @@ variable "allocated_storage" { } variable "storage_type" { - 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'." + 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" type = string default = null } +variable "storage_throughput" { + description = "Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type." + type = number + default = null +} + variable "storage_encrypted" { description = "Specifies whether the DB instance is encrypted" type = bool diff --git a/modules/db_instance/versions.tf b/modules/db_instance/versions.tf index e511e534..2ec0854b 100644 --- a/modules/db_instance/versions.tf +++ b/modules/db_instance/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } random = { diff --git a/modules/db_instance_automated_backups_replication/versions.tf b/modules/db_instance_automated_backups_replication/versions.tf index b3526af1..325eee94 100644 --- a/modules/db_instance_automated_backups_replication/versions.tf +++ b/modules/db_instance_automated_backups_replication/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/modules/db_option_group/README.md b/modules/db_option_group/README.md index fbd616f7..3e22ab0d 100644 --- a/modules/db_option_group/README.md +++ b/modules/db_option_group/README.md @@ -6,13 +6,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/modules/db_option_group/versions.tf b/modules/db_option_group/versions.tf index b3526af1..325eee94 100644 --- a/modules/db_option_group/versions.tf +++ b/modules/db_option_group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/modules/db_parameter_group/README.md b/modules/db_parameter_group/README.md index 9c67f342..80d1ce59 100644 --- a/modules/db_parameter_group/README.md +++ b/modules/db_parameter_group/README.md @@ -6,13 +6,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/modules/db_parameter_group/versions.tf b/modules/db_parameter_group/versions.tf index b3526af1..325eee94 100644 --- a/modules/db_parameter_group/versions.tf +++ b/modules/db_parameter_group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/modules/db_subnet_group/README.md b/modules/db_subnet_group/README.md index 7d0c6ae2..e10d6c79 100644 --- a/modules/db_subnet_group/README.md +++ b/modules/db_subnet_group/README.md @@ -6,13 +6,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.28 | +| [aws](#requirement\_aws) | >= 4.45 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.28 | +| [aws](#provider\_aws) | >= 4.45 | ## Modules diff --git a/modules/db_subnet_group/versions.tf b/modules/db_subnet_group/versions.tf index b3526af1..325eee94 100644 --- a/modules/db_subnet_group/versions.tf +++ b/modules/db_subnet_group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } } } diff --git a/variables.tf b/variables.tf index b89cd40f..8b11bc3e 100644 --- a/variables.tf +++ b/variables.tf @@ -16,11 +16,17 @@ variable "allocated_storage" { } variable "storage_type" { - description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not" + 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" type = string default = null } +variable "storage_throughput" { + description = "Storage throughput value for the DB instance. This setting applies only to the `gp3` storage type." + type = number + default = null +} + variable "storage_encrypted" { description = "Specifies whether the DB instance is encrypted" type = bool diff --git a/versions.tf b/versions.tf index e511e534..2ec0854b 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.28" + version = ">= 4.45" } random = {