Skip to content

Commit ae4cdb0

Browse files
authored
Merge pull request #4 from data-platform-hq/database_id_output
fix: added database id output
2 parents 68fdea8 + dbeca34 commit ae4cdb0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ No modules.
5858
## Outputs
5959

6060
| Name | Description |
61-
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
61+
|------------------------------------------------------------------------------------------------------------| --------------------------------------------------------- |
6262
| <a name="output_mssql_database_secrets"></a> [mssql\_database\_secrets](#output\_mssql\_database\_secrets) | Map of Database Name to JDBC Connection String |
63+
| <a name="output_sql_database_id"></a> [sql\_database\_id](#output\_sql\_database\_id) | Id of Database |
6364
| <a name="output_sql_server_id"></a> [sql\_server\_id](#output\_sql\_server\_id) | Id of SQL server |
6465
| <a name="output_sql_database_names"></a> [sql\_database\_names](#output\_sql\_database\_names) | Database name of the Azure SQL Database created |
6566
| <a name="output_sql_database_max_size"></a> [sql\_database\_max\_size](#output\_sql\_database\_max\_size) | Database max size in GB of the Azure SQL Database created |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ output "mssql_database_secrets" {
1010
description = "Map of Database Name to JDBC Connection String"
1111
}
1212

13+
output "sql_database_id" {
14+
value = { for k, v in azurerm_mssql_database.this : k => v.id }
15+
description = "Id of Database"
16+
}
17+
1318
output "sql_server_id" {
1419
value = { for k, v in azurerm_mssql_database.this : k => v.server_id }
1520
description = "Id of SQL server"

0 commit comments

Comments
 (0)