Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Terraform] Update sql template #374 #413

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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 @@ -56,19 +56,18 @@ 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"
resource_type = "mssql_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
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ resource "azurerm_mssql_database" "database" {
auto_pause_delay_in_minutes = 60
}

resource "azurecaf_name" "sql_firewall_rule" {
resource "azurecaf_name" "mssql_firewall_rule" {
name = var.application_name
resource_type = "azurerm_sql_firewall_rule"
resource_type = "mssql_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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ resource "azurerm_mssql_database" "database" {
auto_pause_delay_in_minutes = 60
}

resource "azurecaf_name" "sql_firewall_rule" {
resource "azurecaf_name" "mssql_firewall_rule" {
name = var.application_name
resource_type = "azurerm_sql_firewall_rule"
resource_type = "mssql_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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ resource "azurerm_mssql_database" "database" {
auto_pause_delay_in_minutes = 60
}

resource "azurecaf_name" "sql_firewall_rule" {
resource "azurecaf_name" "mssql_firewall_rule" {
name = var.application_name
resource_type = "azurerm_sql_firewall_rule"
resource_type = "mssql_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"
}