Skip to content

Commit

Permalink
[Terraform] Update sql template microsoft#374
Browse files Browse the repository at this point in the history
  • Loading branch information
wiZzwise committed Mar 27, 2023
1 parent f34a0ce commit ea2f170
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ resource "azurerm_mssql_database" "database" {
}
{{^NetworkVNet}}

resource "azurecaf_name" "sql_firewall_rule" {
resource "azurecaf_name" "mssql_firewall_rule" {
name = var.application_name
resource_type = "azurerm_sql_firewall_rule"
suffixes = [var.environment]
}

# This rule is to enable the 'Allow access to Azure services' checkbox
resource "azurerm_sql_firewall_rule" "database" {
name = azurecaf_name.sql_firewall_rule.result
resource_group_name = var.resource_group
server_name = azurerm_mssql_server.database.name
start_ip_address = "0.0.0.0"
end_ip_address = "0.0.0.0"
resource "azurerm_mssql_firewall_rule" "database" {
name = azurecaf_name.mssql_firewall_rule.result
server_id = azurerm_mssql_server.database.id
start_ip_address = "0.0.0.0"
end_ip_address = "0.0.0.0"
}

{{/NetworkVNet}}
{{#NetworkVNet}}

Expand Down

0 comments on commit ea2f170

Please sign in to comment.