From 3ca00c69ea0a923654b1f74f5761319cdd7c6d89 Mon Sep 17 00:00:00 2001 From: Jonathan Woytek Date: Thu, 8 Jun 2023 16:16:12 -0400 Subject: [PATCH] update to follow change in aws_db_instance id aws_db_instance was updated by https://github.com/hashicorp/terraform-provider-aws/pull/31232 such that the `id` attribute now tracks the resource ID, and the identifier is now returned in a new attribute named `identifier`. The resource ID is already available in `instance_resource_id`. This fix allows existing users to continue using this module with no changes and preserves the original function of the `id` attribute in this module. Fixes #495. --- modules/db_instance/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/db_instance/outputs.tf b/modules/db_instance/outputs.tf index 5b622634..cbea34c5 100644 --- a/modules/db_instance/outputs.tf +++ b/modules/db_instance/outputs.tf @@ -50,7 +50,7 @@ output "db_instance_hosted_zone_id" { output "db_instance_id" { description = "The RDS instance ID" - value = try(aws_db_instance.this[0].id, "") + value = try(aws_db_instance.this[0].identifier, "") } output "db_instance_resource_id" {