Skip to content

Commit

Permalink
OPS-0 Update rds modules (#83)
Browse files Browse the repository at this point in the history
* OPS-0 Update rds modules

* OPS-0 Update provider dependencies

* OPS-0 Fix examples
  • Loading branch information
snovikov authored Mar 12, 2024
1 parent 7cab41d commit 4a5ae68
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 37 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ The following resources _CAN_ be created:

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
| <a name="provider_null"></a> [null](#provider\_null) | ~> 3.0 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.40 |
| <a name="provider_null"></a> [null](#provider\_null) | ~> 3.2 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.6 |

<!-- TFDOCS_PROVIDER_END -->

Expand All @@ -263,9 +263,9 @@ The following resources _CAN_ be created:
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | ~> 3.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |
| <a name="requirement_null"></a> [null](#requirement\_null) | ~> 3.2 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.6 |

<!-- TFDOCS_REQUIREMENTS_END -->

Expand Down Expand Up @@ -2196,7 +2196,7 @@ Default: `false`
| <a name="output_rds_this_db_instance_availability_zone"></a> [rds\_this\_db\_instance\_availability\_zone](#output\_rds\_this\_db\_instance\_availability\_zone) | The availability zone of the RDS instance |
| <a name="output_rds_this_db_instance_endpoint"></a> [rds\_this\_db\_instance\_endpoint](#output\_rds\_this\_db\_instance\_endpoint) | The connection endpoint |
| <a name="output_rds_this_db_instance_hosted_zone_id"></a> [rds\_this\_db\_instance\_hosted\_zone\_id](#output\_rds\_this\_db\_instance\_hosted\_zone\_id) | The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record) |
| <a name="output_rds_this_db_instance_id"></a> [rds\_this\_db\_instance\_id](#output\_rds\_this\_db\_instance\_id) | The RDS instance ID |
| <a name="output_rds_this_db_instance_identifier"></a> [rds\_this\_db\_instance\_identifier](#output\_rds\_this\_db\_instance\_identifier) | The RDS instance Identifier |
| <a name="output_rds_this_db_instance_name"></a> [rds\_this\_db\_instance\_name](#output\_rds\_this\_db\_instance\_name) | The database name |
| <a name="output_rds_this_db_instance_password"></a> [rds\_this\_db\_instance\_password](#output\_rds\_this\_db\_instance\_password) | The database password (this password may be old, because Terraform doesn't track it after initial creation) |
| <a name="output_rds_this_db_instance_port"></a> [rds\_this\_db\_instance\_port](#output\_rds\_this\_db\_instance\_port) | The database port |
Expand Down
2 changes: 1 addition & 1 deletion examples/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down
2 changes: 1 addition & 1 deletion examples/dynamodb/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down
2 changes: 1 addition & 1 deletion examples/iam/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
4 changes: 2 additions & 2 deletions examples/rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down Expand Up @@ -35,7 +35,7 @@ No inputs.
| <a name="output_ms_sample_rds_rds_this_db_instance_availability_zone"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_availability\_zone](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_availability\_zone) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_endpoint"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_endpoint](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_endpoint) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_hosted_zone_id"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_hosted\_zone\_id](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_hosted\_zone\_id) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_id"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_id](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_id) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_identifier"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_identifier](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_identifier) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_resource_id"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_resource\_id](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_resource\_id) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_status"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_status](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_status) | n/a |
| <a name="output_ms_sample_rds_rds_this_db_instance_name"></a> [ms\_sample\_rds\_rds\_this\_db\_instance\_name](#output\_ms\_sample\_rds\_rds\_this\_db\_instance\_name) | n/a |
Expand Down
4 changes: 2 additions & 2 deletions examples/rds/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ output "ms_sample_rds_rds_this_db_instance_hosted_zone_id" {
value = module.ms_sample_rds.rds_this_db_instance_hosted_zone_id
}

output "ms_sample_rds_rds_this_db_instance_id" {
value = module.ms_sample_rds.rds_this_db_instance_id
output "ms_sample_rds_rds_this_db_instance_identifier" {
value = module.ms_sample_rds.rds_this_db_instance_identifier
}

output "ms_sample_rds_rds_this_db_instance_resource_id" {
Expand Down
2 changes: 1 addition & 1 deletion examples/rds/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down
2 changes: 1 addition & 1 deletion examples/redis/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down
2 changes: 1 addition & 1 deletion examples/s3/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.40 |

## Providers

Expand Down
2 changes: 1 addition & 1 deletion examples/sqs/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.10"
version = "~> 5.40"
}
}
required_version = "~> 1.3"
Expand Down
8 changes: 4 additions & 4 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ output "rds_this_db_instance_hosted_zone_id" {
value = module.rds.db_instance_hosted_zone_id
}

output "rds_this_db_instance_id" {
description = "The RDS instance ID"
value = module.rds.db_instance_id
output "rds_this_db_instance_identifier" {
description = "The RDS instance Identifier"
value = module.rds.db_instance_identifier
}

output "rds_this_db_instance_resource_id" {
Expand All @@ -307,7 +307,7 @@ output "rds_this_db_instance_username" {

output "rds_this_db_instance_password" {
description = "The database password (this password may be old, because Terraform doesn't track it after initial creation)"
value = module.rds.db_instance_password
value = local.password
sensitive = true
}

Expand Down
2 changes: 1 addition & 1 deletion rds-s3-dumps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ resource "aws_iam_role" "rds_dumps" {
resource "aws_db_instance_role_association" "this" {
count = local.rds_dumps_enabled ? 1 : 0

db_instance_identifier = module.rds.db_instance_id
db_instance_identifier = module.rds.db_instance_identifier
feature_name = "S3_INTEGRATION"
role_arn = var.rds_s3_dump_role_arn == "" ? aws_iam_role.rds_dumps[0].arn : var.rds_s3_dump_role_arn
}
Expand Down
14 changes: 7 additions & 7 deletions rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {

module "rds_sg" {
source = "terraform-aws-modules/security-group/aws"
version = "4.13.1"
version = "5.1.1"

create = var.rds_enabled

Expand All @@ -51,7 +51,7 @@ resource "random_string" "password" {
# -------------------------------------------------------------------------------------------------
module "rds" {
source = "terraform-aws-modules/rds/aws"
version = "5.1.0"
version = "6.5.2"

apply_immediately = var.rds_apply_immediately

Expand Down Expand Up @@ -85,11 +85,11 @@ module "rds" {
family = var.rds_family
license_model = var.rds_license_model

db_name = local.rds_db_name
username = var.rds_admin_user
password = local.password
port = var.rds_port
create_random_password = false
db_name = local.rds_db_name
username = var.rds_admin_user
password = local.password
port = var.rds_port
manage_master_user_password = false

iam_database_authentication_enabled = var.rds_iam_database_authentication_enabled

Expand Down
6 changes: 3 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
version = "~> 5.40"
}
null = {
source = "hashicorp/null"
version = "~> 3.0"
version = "~> 3.2"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
version = "~> 3.6"
}
}
required_version = ">= 1.3"
Expand Down

0 comments on commit 4a5ae68

Please sign in to comment.