Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ output "postgresql_db_id" {
value = azurerm_postgresql_flexible_server_database.postgresql_database.id
depends_on = [azurerm_postgresql_flexible_server_database.postgresql_database]
}

output "postgresql_db_name" {
value = azurerm_postgresql_flexible_server_database.postgresql_database.name
depends_on = [azurerm_postgresql_flexible_server_database.postgresql_database]
}
Comment on lines +17 to +20
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the redundant depends_on clause and add a description.

The output correctly exposes the database name, but the explicit depends_on is unnecessary since Terraform automatically tracks dependencies through the value reference. Remove it and add a description for clarity:

 output "postgresql_db_name" {
+  description = "The name of the PostgreSQL Flexible Server Database"
   value      = azurerm_postgresql_flexible_server_database.postgresql_database.name
-  depends_on = [azurerm_postgresql_flexible_server_database.postgresql_database]
 }
🤖 Prompt for AI Agents
In modules/azurerm/PostgreSQL-Flexible-Server-Database/outputs.tf around lines
17-20, remove the redundant depends_on attribute from the postgresql_db_name
output (Terraform already infers the dependency via the value reference) and add
a description field to the output describing what it exposes (e.g., "Name of the
PostgreSQL flexible server database") to improve clarity.