Add output for PostgreSQL database name#191
Conversation
WalkthroughA new Terraform output named Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| output "postgresql_db_name" { | ||
| value = azurerm_postgresql_flexible_server_database.postgresql_database.name | ||
| depends_on = [azurerm_postgresql_flexible_server_database.postgresql_database] | ||
| } |
There was a problem hiding this comment.
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.
Purpose
This pull request adds a new output to the PostgreSQL Flexible Server Database Terraform module, making the database name available as an output variable.
Outputs improvement:
postgresql_db_nametooutputs.tfto expose the database name, allowing other modules or resources to reference it directly.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.