diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 3973df44..1e50760e 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -14,7 +14,7 @@ jobs: steps: # Please look up the latest version from # https://github.com/amannn/action-semantic-pull-request/releases - - uses: amannn/action-semantic-pull-request@v5.4.0 + - uses: amannn/action-semantic-pull-request@v5.5.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c2632d1a..a19ff831 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -7,8 +7,8 @@ on: - master env: - TERRAFORM_DOCS_VERSION: v0.16.0 - TFLINT_VERSION: v0.50.3 + TERRAFORM_DOCS_VERSION: v0.19.0 + TFLINT_VERSION: v0.53.0 jobs: collectInputs: @@ -45,14 +45,14 @@ jobs: - name: Terraform min/max versions id: minMax - uses: clowdhaus/terraform-min-max@v1.3.0 + uses: clowdhaus/terraform-min-max@v1.3.1 with: directory: ${{ matrix.directory }} - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} # Run only validate pre-commit check on min version supported if: ${{ matrix.directory != '.' }} - uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 + uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1 with: terraform-version: ${{ steps.minMax.outputs.minVersion }} tflint-version: ${{ env.TFLINT_VERSION }} @@ -61,7 +61,7 @@ jobs: - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} # Run only validate pre-commit check on min version supported if: ${{ matrix.directory == '.' }} - uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 + uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1 with: terraform-version: ${{ steps.minMax.outputs.minVersion }} tflint-version: ${{ env.TFLINT_VERSION }} @@ -88,10 +88,10 @@ jobs: - name: Terraform min/max versions id: minMax - uses: clowdhaus/terraform-min-max@v1.3.0 + uses: clowdhaus/terraform-min-max@v1.3.1 - name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }} - uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 + uses: clowdhaus/terraform-composite-actions/pre-commit@v1.11.1 with: terraform-version: ${{ steps.minMax.outputs.maxVersion }} tflint-version: ${{ env.TFLINT_VERSION }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c67ffe84..a6cd3694 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.88.2 + rev: v1.96.1 hooks: - id: terraform_fmt - id: terraform_docs @@ -23,7 +23,7 @@ repos: - '--args=--only=terraform_workspace_remote' - id: terraform_validate - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-merge-conflict - id: end-of-file-fixer diff --git a/CHANGELOG.md b/CHANGELOG.md index e50ed913..942bc7f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file. +## [6.10.0](https://github.com/terraform-aws-modules/terraform-aws-rds/compare/v6.9.0...v6.10.0) (2024-10-16) + + +### Features + +* Support `cloudwatch_log_group_tags` parameter ([#571](https://github.com/terraform-aws-modules/terraform-aws-rds/issues/571)) ([73e33fe](https://github.com/terraform-aws-modules/terraform-aws-rds/commit/73e33feba5d907801791168ebf6d3132fbd646f5)) + + +### Bug Fixes + +* Update CI workflow versions to latest ([#570](https://github.com/terraform-aws-modules/terraform-aws-rds/issues/570)) ([220cc85](https://github.com/terraform-aws-modules/terraform-aws-rds/commit/220cc85dcdc8eb63772e25526db693dd563d40a1)) + +## [6.9.0](https://github.com/terraform-aws-modules/terraform-aws-rds/compare/v6.8.0...v6.9.0) (2024-08-19) + + +### Features + +* Support `skip_destroy` for option and param groups and add `upgrade_storage_config` for replicas ([#559](https://github.com/terraform-aws-modules/terraform-aws-rds/issues/559)) ([3f73565](https://github.com/terraform-aws-modules/terraform-aws-rds/commit/3f73565f673d38bffac3c339f436782cd79f01fb)) + ## [6.8.0](https://github.com/terraform-aws-modules/terraform-aws-rds/compare/v6.7.0...v6.8.0) (2024-07-20) diff --git a/README.md b/README.md index 44cef70d..39338162 100644 --- a/README.md +++ b/README.md @@ -204,13 +204,13 @@ Users have the ability to: 1. This module does not create RDS security group. Use [terraform-aws-security-group](https://github.com/terraform-aws-modules/terraform-aws-security-group) module for this. 2. For an RDS instance with `storage_type` using `gp3`, be aware that `iops` and `storage_throughput` cannot be specified if the `allocated_storage` value is below a per-`engine` threshold. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#gp3-storage) for details. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers @@ -248,6 +248,7 @@ No resources. | [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data | `string` | `null` | no | | [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | The number of days to retain CloudWatch logs for the DB instance | `number` | `7` | no | | [cloudwatch\_log\_group\_skip\_destroy](#input\_cloudwatch\_log\_group\_skip\_destroy) | Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state | `bool` | `null` | no | +| [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | Additional tags for the CloudWatch log group(s) | `map(string)` | `{}` | no | | [copy\_tags\_to\_snapshot](#input\_copy\_tags\_to\_snapshot) | On delete, copy all Instance tags to the final snapshot | `bool` | `false` | no | | [create\_cloudwatch\_log\_group](#input\_create\_cloudwatch\_log\_group) | Determines whether a CloudWatch log group is created for each `enabled_cloudwatch_logs_exports` | `bool` | `false` | no | | [create\_db\_instance](#input\_create\_db\_instance) | Whether to create a database instance | `bool` | `true` | no | @@ -308,11 +309,13 @@ No resources. | [network\_type](#input\_network\_type) | The type of network stack to use | `string` | `null` | no | | [option\_group\_description](#input\_option\_group\_description) | The description of the option group | `string` | `null` | no | | [option\_group\_name](#input\_option\_group\_name) | Name of the option group | `string` | `null` | no | +| [option\_group\_skip\_destroy](#input\_option\_group\_skip\_destroy) | Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Terraform state | `bool` | `null` | no | | [option\_group\_timeouts](#input\_option\_group\_timeouts) | Define maximum timeout for deletion of `aws_db_option_group` resource | `map(string)` | `{}` | no | | [option\_group\_use\_name\_prefix](#input\_option\_group\_use\_name\_prefix) | Determines whether to use `option_group_name` as is or create a unique name beginning with the `option_group_name` as the prefix | `bool` | `true` | no | | [options](#input\_options) | A list of Options to apply | `any` | `[]` | no | | [parameter\_group\_description](#input\_parameter\_group\_description) | Description of the DB parameter group to create | `string` | `null` | no | | [parameter\_group\_name](#input\_parameter\_group\_name) | Name of the DB parameter group to associate or create | `string` | `null` | no | +| [parameter\_group\_skip\_destroy](#input\_parameter\_group\_skip\_destroy) | Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state | `bool` | `null` | no | | [parameter\_group\_use\_name\_prefix](#input\_parameter\_group\_use\_name\_prefix) | Determines whether to use `parameter_group_name` as is or create a unique name beginning with the `parameter_group_name` as the prefix | `bool` | `true` | no | | [parameters](#input\_parameters) | A list of DB parameters (map) to apply | `list(map(string))` | `[]` | no | | [password](#input\_password) | Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file.
The password provided will not be used if `manage_master_user_password` is set to true. | `string` | `null` | no | @@ -335,6 +338,7 @@ No resources. | [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 | +| [upgrade\_storage\_config](#input\_upgrade\_storage\_config) | Whether to upgrade the storage file system configuration on the read replica. Can only be set with replicate\_source\_db. | `bool` | `null` | no | | [username](#input\_username) | Username for the master DB user | `string` | `null` | no | | [vpc\_security\_group\_ids](#input\_vpc\_security\_group\_ids) | List of VPC security groups to associate | `list(string)` | `[]` | no | @@ -375,7 +379,7 @@ No resources. | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | | [enhanced\_monitoring\_iam\_role\_arn](#output\_enhanced\_monitoring\_iam\_role\_arn) | The Amazon Resource Name (ARN) specifying the monitoring role | | [enhanced\_monitoring\_iam\_role\_name](#output\_enhanced\_monitoring\_iam\_role\_name) | The name of the monitoring role | - + ## Authors diff --git a/examples/blue-green-deployment/README.md b/examples/blue-green-deployment/README.md index 741496eb..95a1d45a 100644 --- a/examples/blue-green-deployment/README.md +++ b/examples/blue-green-deployment/README.md @@ -21,19 +21,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -95,4 +95,4 @@ No inputs. | [postgres\_db\_parameter\_group\_id](#output\_postgres\_db\_parameter\_group\_id) | The db parameter group id | | [postgres\_db\_subnet\_group\_arn](#output\_postgres\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [postgres\_db\_subnet\_group\_id](#output\_postgres\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/blue-green-deployment/versions.tf b/examples/blue-green-deployment/versions.tf index 7ea01589..53040bf6 100644 --- a/examples/blue-green-deployment/versions.tf +++ b/examples/blue-green-deployment/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/complete-mssql/README.md b/examples/complete-mssql/README.md index ddc2a408..bb11310e 100644 --- a/examples/complete-mssql/README.md +++ b/examples/complete-mssql/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -78,4 +78,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/complete-mssql/versions.tf b/examples/complete-mssql/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/complete-mysql/README.md b/examples/complete-mysql/README.md index 4714e26a..bb4c4aaf 100644 --- a/examples/complete-mysql/README.md +++ b/examples/complete-mysql/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -91,4 +91,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/complete-mysql/main.tf b/examples/complete-mysql/main.tf index 6f916470..41a02c8f 100644 --- a/examples/complete-mysql/main.tf +++ b/examples/complete-mysql/main.tf @@ -82,6 +82,9 @@ module "db" { db_subnet_group_tags = { "Sensitive" = "high" } + cloudwatch_log_group_tags = { + "Sensitive" = "high" + } } module "db_default" { diff --git a/examples/complete-mysql/versions.tf b/examples/complete-mysql/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/complete-oracle/README.md b/examples/complete-oracle/README.md index 1df6f4c9..6bf315b8 100644 --- a/examples/complete-oracle/README.md +++ b/examples/complete-oracle/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -73,4 +73,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/complete-oracle/versions.tf b/examples/complete-oracle/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/complete-postgres/README.md b/examples/complete-postgres/README.md index eb7588b0..8f05a95d 100644 --- a/examples/complete-postgres/README.md +++ b/examples/complete-postgres/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -96,4 +96,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/complete-postgres/main.tf b/examples/complete-postgres/main.tf index 6974601f..bd712492 100644 --- a/examples/complete-postgres/main.tf +++ b/examples/complete-postgres/main.tf @@ -97,6 +97,9 @@ module "db" { db_parameter_group_tags = { "Sensitive" = "low" } + cloudwatch_log_group_tags = { + "Sensitive" = "high" + } } module "db_default" { diff --git a/examples/complete-postgres/versions.tf b/examples/complete-postgres/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/cross-region-replica-postgres/README.md b/examples/cross-region-replica-postgres/README.md index 85488b9e..3b15fc5c 100644 --- a/examples/cross-region-replica-postgres/README.md +++ b/examples/cross-region-replica-postgres/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -84,4 +84,4 @@ No inputs. | [replica\_db\_instance\_resource\_id](#output\_replica\_db\_instance\_resource\_id) | The RDS Resource ID of this instance | | [replica\_db\_instance\_status](#output\_replica\_db\_instance\_status) | The RDS instance status | | [replica\_db\_instance\_username](#output\_replica\_db\_instance\_username) | The replica username for the database | - + diff --git a/examples/cross-region-replica-postgres/versions.tf b/examples/cross-region-replica-postgres/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/enhanced-monitoring/README.md b/examples/enhanced-monitoring/README.md index b496d777..f6d030d4 100644 --- a/examples/enhanced-monitoring/README.md +++ b/examples/enhanced-monitoring/README.md @@ -16,19 +16,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -74,4 +74,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/enhanced-monitoring/versions.tf b/examples/enhanced-monitoring/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/groups/README.md b/examples/groups/README.md index 604d6668..ab5d514e 100644 --- a/examples/groups/README.md +++ b/examples/groups/README.md @@ -14,13 +14,13 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers @@ -68,4 +68,4 @@ No inputs. | [default\_postgres\_option\_group\_id](#output\_default\_postgres\_option\_group\_id) | The ID of the default PostgreSQL option group (should be blank) | | [default\_postgres\_parameter\_group\_arn](#output\_default\_postgres\_parameter\_group\_arn) | The ARN of the db parameter group | | [default\_postgres\_parameter\_group\_id](#output\_default\_postgres\_parameter\_group\_id) | The db parameter group id | - + diff --git a/examples/groups/versions.tf b/examples/groups/versions.tf index 7ea01589..53040bf6 100644 --- a/examples/groups/versions.tf +++ b/examples/groups/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/replica-mysql/README.md b/examples/replica-mysql/README.md index 6ab0aadb..dfc9c42a 100644 --- a/examples/replica-mysql/README.md +++ b/examples/replica-mysql/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -81,4 +81,4 @@ No inputs. | [replica\_db\_instance\_resource\_id](#output\_replica\_db\_instance\_resource\_id) | The RDS Resource ID of this instance | | [replica\_db\_instance\_status](#output\_replica\_db\_instance\_status) | The RDS instance status | | [replica\_db\_instance\_username](#output\_replica\_db\_instance\_username) | The replica username for the database | - + diff --git a/examples/replica-mysql/versions.tf b/examples/replica-mysql/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/replica-postgres/README.md b/examples/replica-postgres/README.md index beb32e5f..2013959b 100644 --- a/examples/replica-postgres/README.md +++ b/examples/replica-postgres/README.md @@ -14,19 +14,19 @@ $ terraform apply Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -81,4 +81,4 @@ No inputs. | [replica\_db\_instance\_resource\_id](#output\_replica\_db\_instance\_resource\_id) | The RDS Resource ID of this instance | | [replica\_db\_instance\_status](#output\_replica\_db\_instance\_status) | The RDS instance status | | [replica\_db\_instance\_username](#output\_replica\_db\_instance\_username) | The replica username for the database | - + diff --git a/examples/replica-postgres/versions.tf b/examples/replica-postgres/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/role-association-postgres/README.md b/examples/role-association-postgres/README.md index 3bccb098..49a9cf67 100644 --- a/examples/role-association-postgres/README.md +++ b/examples/role-association-postgres/README.md @@ -4,19 +4,19 @@ Configuration in this directory creates a DB instance role association to invoke Further database configurations for creating extension and invoking from postgres: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL-Lambda.html - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -67,4 +67,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/role-association-postgres/versions.tf b/examples/role-association-postgres/versions.tf index 7ea01589..53040bf6 100644 --- a/examples/role-association-postgres/versions.tf +++ b/examples/role-association-postgres/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.59" + version = ">= 5.62" } } } diff --git a/examples/s3-import-mysql/README.md b/examples/s3-import-mysql/README.md index ea5c284c..9eeb76f7 100644 --- a/examples/s3-import-mysql/README.md +++ b/examples/s3-import-mysql/README.md @@ -43,19 +43,19 @@ $ mv /tmp/backup ./backup Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -103,4 +103,4 @@ No inputs. | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/examples/s3-import-mysql/versions.tf b/examples/s3-import-mysql/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/main.tf b/main.tf index 2687bf08..44249211 100644 --- a/main.tf +++ b/main.tf @@ -33,7 +33,8 @@ module "db_parameter_group" { description = var.parameter_group_description family = var.family - parameters = var.parameters + parameters = var.parameters + skip_destroy = var.parameter_group_skip_destroy tags = merge(var.tags, var.db_parameter_group_tags) } @@ -49,7 +50,8 @@ module "db_option_group" { engine_name = var.engine major_engine_version = var.major_engine_version - options = var.options + options = var.options + skip_destroy = var.option_group_skip_destroy timeouts = var.option_group_timeouts @@ -100,13 +102,14 @@ module "db_instance" { option_group_name = var.engine != "postgres" ? local.option_group : null network_type = var.network_type - 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 - dedicated_log_volume = var.dedicated_log_volume + 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 + dedicated_log_volume = var.dedicated_log_volume + upgrade_storage_config = var.upgrade_storage_config allow_major_version_upgrade = var.allow_major_version_upgrade auto_minor_version_upgrade = var.auto_minor_version_upgrade @@ -146,6 +149,7 @@ module "db_instance" { cloudwatch_log_group_kms_key_id = var.cloudwatch_log_group_kms_key_id cloudwatch_log_group_skip_destroy = var.cloudwatch_log_group_skip_destroy cloudwatch_log_group_class = var.cloudwatch_log_group_class + cloudwatch_log_group_tags = var.cloudwatch_log_group_tags timeouts = var.timeouts diff --git a/modules/db_instance/README.md b/modules/db_instance/README.md index 46cdbabd..3746718e 100644 --- a/modules/db_instance/README.md +++ b/modules/db_instance/README.md @@ -1,19 +1,19 @@ # aws_db_instance - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | | [random](#requirement\_random) | >= 3.1 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | | [random](#provider\_random) | >= 3.1 | ## Modules @@ -51,6 +51,7 @@ No modules. | [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data | `string` | `null` | no | | [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | The number of days to retain CloudWatch logs for the DB instance | `number` | `7` | no | | [cloudwatch\_log\_group\_skip\_destroy](#input\_cloudwatch\_log\_group\_skip\_destroy) | Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state | `bool` | `null` | no | +| [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | Additional tags for the CloudWatch log group(s) | `map(string)` | `{}` | no | | [copy\_tags\_to\_snapshot](#input\_copy\_tags\_to\_snapshot) | On delete, copy all Instance tags to the final snapshot | `bool` | `false` | no | | [create](#input\_create) | Whether to create this resource or not? | `bool` | `true` | no | | [create\_cloudwatch\_log\_group](#input\_create\_cloudwatch\_log\_group) | Determines whether a CloudWatch log group is created for each `enabled_cloudwatch_logs_exports` | `bool` | `false` | no | @@ -117,6 +118,7 @@ No modules. | [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 | +| [upgrade\_storage\_config](#input\_upgrade\_storage\_config) | Whether to upgrade the storage file system configuration on the read replica. Can only be set with replicate\_source\_db. | `bool` | `null` | no | | [use\_identifier\_prefix](#input\_use\_identifier\_prefix) | Determines whether to use `identifier` as is or create a unique identifier beginning with `identifier` as the specified prefix | `bool` | `false` | no | | [username](#input\_username) | Username for the master DB user | `string` | `null` | no | | [vpc\_security\_group\_ids](#input\_vpc\_security\_group\_ids) | List of VPC security groups to associate | `list(string)` | `[]` | no | @@ -151,4 +153,4 @@ No modules. | [db\_listener\_endpoint](#output\_db\_listener\_endpoint) | Specifies the listener connection endpoint for SQL Server Always On | | [enhanced\_monitoring\_iam\_role\_arn](#output\_enhanced\_monitoring\_iam\_role\_arn) | The Amazon Resource Name (ARN) specifying the monitoring role | | [enhanced\_monitoring\_iam\_role\_name](#output\_enhanced\_monitoring\_iam\_role\_name) | The name of the monitoring role | - + diff --git a/modules/db_instance/main.tf b/modules/db_instance/main.tf index 1e067a88..ce9b4c43 100644 --- a/modules/db_instance/main.tf +++ b/modules/db_instance/main.tf @@ -63,13 +63,14 @@ resource "aws_db_instance" "this" { option_group_name = var.option_group_name network_type = var.network_type - 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 - dedicated_log_volume = var.dedicated_log_volume + 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 + dedicated_log_volume = var.dedicated_log_volume + upgrade_storage_config = var.upgrade_storage_config allow_major_version_upgrade = var.allow_major_version_upgrade auto_minor_version_upgrade = var.auto_minor_version_upgrade @@ -162,7 +163,7 @@ resource "aws_cloudwatch_log_group" "this" { skip_destroy = var.cloudwatch_log_group_skip_destroy log_group_class = var.cloudwatch_log_group_class - tags = var.tags + tags = merge(var.tags, var.cloudwatch_log_group_tags) } ################################################################################ diff --git a/modules/db_instance/variables.tf b/modules/db_instance/variables.tf index 97aeec42..acb17305 100644 --- a/modules/db_instance/variables.tf +++ b/modules/db_instance/variables.tf @@ -438,6 +438,12 @@ variable "dedicated_log_volume" { default = false } +variable "upgrade_storage_config" { + description = "Whether to upgrade the storage file system configuration on the read replica. Can only be set with replicate_source_db." + type = bool + default = null +} + ################################################################################ # CloudWatch Log Group ################################################################################ @@ -472,6 +478,12 @@ variable "cloudwatch_log_group_class" { default = null } +variable "cloudwatch_log_group_tags" { + description = "Additional tags for the CloudWatch log group(s)" + type = map(string) + default = {} +} + ################################################################################ # Managed Secret Rotation ################################################################################ diff --git a/modules/db_instance/versions.tf b/modules/db_instance/versions.tf index bbc916c8..7c522cc9 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 = ">= 5.59" + version = ">= 5.62" } random = { diff --git a/modules/db_instance_automated_backups_replication/versions.tf b/modules/db_instance_automated_backups_replication/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/modules/db_instance_role_association/README.md b/modules/db_instance_role_association/README.md index a111587e..37d1a4ae 100644 --- a/modules/db_instance_role_association/README.md +++ b/modules/db_instance_role_association/README.md @@ -1,18 +1,18 @@ # aws_db_instance_role_association - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -38,4 +38,4 @@ No modules. | Name | Description | |------|-------------| | [db\_instance\_role\_association\_id](#output\_db\_instance\_role\_association\_id) | DB Instance Identifier and IAM Role ARN separated by a comma | - + diff --git a/modules/db_instance_role_association/versions.tf b/modules/db_instance_role_association/versions.tf index 7ea01589..53040bf6 100644 --- a/modules/db_instance_role_association/versions.tf +++ b/modules/db_instance_role_association/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.59" + version = ">= 5.62" } } } diff --git a/modules/db_option_group/README.md b/modules/db_option_group/README.md index 2121e328..163b0059 100644 --- a/modules/db_option_group/README.md +++ b/modules/db_option_group/README.md @@ -1,18 +1,18 @@ # aws_db_option_group - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -34,6 +34,7 @@ No modules. | [name](#input\_name) | The name of the option group | `string` | `""` | no | | [option\_group\_description](#input\_option\_group\_description) | The description of the option group | `string` | `null` | no | | [options](#input\_options) | A list of Options to apply | `any` | `[]` | no | +| [skip\_destroy](#input\_skip\_destroy) | Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Terraform state | `bool` | `null` | no | | [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no | | [timeouts](#input\_timeouts) | Define maximum timeout for deletion of `aws_db_option_group` resource | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Determines whether to use `name` as is or create a unique name beginning with `name` as the specified prefix | `bool` | `true` | no | @@ -44,4 +45,4 @@ No modules. |------|-------------| | [db\_option\_group\_arn](#output\_db\_option\_group\_arn) | The ARN of the db option group | | [db\_option\_group\_id](#output\_db\_option\_group\_id) | The db option group id | - + diff --git a/modules/db_option_group/main.tf b/modules/db_option_group/main.tf index 6ae35840..88fa554b 100644 --- a/modules/db_option_group/main.tf +++ b/modules/db_option_group/main.tf @@ -33,6 +33,8 @@ resource "aws_db_option_group" "this" { } } + skip_destroy = var.skip_destroy + tags = merge( var.tags, { diff --git a/modules/db_option_group/variables.tf b/modules/db_option_group/variables.tf index de4be194..e990529b 100644 --- a/modules/db_option_group/variables.tf +++ b/modules/db_option_group/variables.tf @@ -40,6 +40,12 @@ variable "options" { default = [] } +variable "skip_destroy" { + description = "Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Terraform state" + type = bool + default = null +} + variable "timeouts" { description = "Define maximum timeout for deletion of `aws_db_option_group` resource" type = map(string) diff --git a/modules/db_option_group/versions.tf b/modules/db_option_group/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/modules/db_parameter_group/README.md b/modules/db_parameter_group/README.md index 01e60281..6c923c60 100644 --- a/modules/db_parameter_group/README.md +++ b/modules/db_parameter_group/README.md @@ -1,18 +1,18 @@ # aws_db_parameter_group - + ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.59 | +| [aws](#requirement\_aws) | >= 5.62 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.59 | +| [aws](#provider\_aws) | >= 5.62 | ## Modules @@ -33,6 +33,7 @@ No modules. | [family](#input\_family) | The family of the DB parameter group | `string` | `null` | no | | [name](#input\_name) | The name of the DB parameter group | `string` | `""` | no | | [parameters](#input\_parameters) | A list of DB parameter maps to apply | `list(map(string))` | `[]` | no | +| [skip\_destroy](#input\_skip\_destroy) | Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state | `bool` | `null` | no | | [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Determines whether to use `name` as is or create a unique name beginning with `name` as the specified prefix | `bool` | `true` | no | @@ -42,4 +43,4 @@ No modules. |------|-------------| | [db\_parameter\_group\_arn](#output\_db\_parameter\_group\_arn) | The ARN of the db parameter group | | [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | The db parameter group id | - + diff --git a/modules/db_parameter_group/main.tf b/modules/db_parameter_group/main.tf index 94acbe5e..19ce380c 100644 --- a/modules/db_parameter_group/main.tf +++ b/modules/db_parameter_group/main.tf @@ -22,6 +22,8 @@ resource "aws_db_parameter_group" "this" { } } + skip_destroy = var.skip_destroy + tags = merge( var.tags, { diff --git a/modules/db_parameter_group/variables.tf b/modules/db_parameter_group/variables.tf index b7b7af9f..702a11f9 100644 --- a/modules/db_parameter_group/variables.tf +++ b/modules/db_parameter_group/variables.tf @@ -34,6 +34,12 @@ variable "parameters" { default = [] } +variable "skip_destroy" { + description = "Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state" + type = bool + default = null +} + variable "tags" { description = "A mapping of tags to assign to the resource" type = map(string) diff --git a/modules/db_parameter_group/versions.tf b/modules/db_parameter_group/versions.tf index 7ea01589..53040bf6 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 = ">= 5.59" + version = ">= 5.62" } } } diff --git a/modules/db_subnet_group/README.md b/modules/db_subnet_group/README.md index 7d56529e..98fbed54 100644 --- a/modules/db_subnet_group/README.md +++ b/modules/db_subnet_group/README.md @@ -1,6 +1,6 @@ # aws_db_subnet_group - + ## Requirements | Name | Version | @@ -41,4 +41,4 @@ No modules. |------|-------------| | [db\_subnet\_group\_arn](#output\_db\_subnet\_group\_arn) | The ARN of the db subnet group | | [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | The db subnet group name | - + diff --git a/variables.tf b/variables.tf index 5332ab4b..cf3e5008 100644 --- a/variables.tf +++ b/variables.tf @@ -426,6 +426,12 @@ variable "parameters" { default = [] } +variable "parameter_group_skip_destroy" { + description = "Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state" + type = bool + default = null +} + # DB option group variable "create_db_option_group" { description = "Create a database option group" @@ -463,6 +469,12 @@ variable "options" { default = [] } +variable "option_group_skip_destroy" { + description = "Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Terraform state" + type = bool + default = null +} + variable "create_db_instance" { description = "Whether to create a database instance" type = bool @@ -553,6 +565,12 @@ variable "network_type" { default = null } +variable "upgrade_storage_config" { + description = "Whether to upgrade the storage file system configuration on the read replica. Can only be set with replicate_source_db." + type = bool + default = null +} + ################################################################################ # CloudWatch Log Group ################################################################################ @@ -587,6 +605,12 @@ variable "cloudwatch_log_group_class" { default = null } +variable "cloudwatch_log_group_tags" { + description = "Additional tags for the CloudWatch log group(s)" + type = map(string) + default = {} +} + variable "putin_khuylo" { description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!" type = bool diff --git a/versions.tf b/versions.tf index 7ea01589..53040bf6 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.59" + version = ">= 5.62" } } }