Skip to content

Commit

Permalink
Bring back api admin for db
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Mar 1, 2024
1 parent eb31ec9 commit d6cdbd8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions operations/template/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ resource "azurerm_postgresql_flexible_server_active_directory_administrator" "ad
principal_type = "ServicePrincipal"
}

#resource "azurerm_postgresql_flexible_server_active_directory_administrator" "admin_for_app" {
# server_name = azurerm_postgresql_flexible_server.database.name
# resource_group_name = data.azurerm_resource_group.group.name
# tenant_id = data.azurerm_client_config.current.tenant_id
# object_id = azurerm_linux_web_app.api.identity.0.principal_id
# principal_name = azurerm_linux_web_app.api.name
# principal_type = "ServicePrincipal"
#}
resource "azurerm_postgresql_flexible_server_active_directory_administrator" "admin_for_app" {
server_name = azurerm_postgresql_flexible_server.database.name
resource_group_name = data.azurerm_resource_group.group.name
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = azurerm_linux_web_app.api.identity.0.principal_id
principal_name = azurerm_linux_web_app.api.name
principal_type = "ServicePrincipal"
}

#resource "azurerm_postgresql_flexible_server_firewall_rule" "db_firewall_5" {
# name = "AllowAzure"
Expand Down

0 comments on commit d6cdbd8

Please sign in to comment.