Terraform-provider-azurerm: Azure SQL Server Firewall Rules not detecting existing rules

Created on 10 Dec 2018  路  2Comments  路  Source: terraform-providers/terraform-provider-azurerm

When using the azurerm_sql_firewall_rule provider, it doesn't seem to apply the same behaviour to existing resources as other providers.

We have a SQL Server with 2 rules, and i have a Terraform config file with 10 rules. When i Plan or Apply this, I expect it to want to add the 10 rules and remove the 2 rules as they are not managed by Terraform. This is not the case, the 10 new rules are added, even if one of the addresses already exists. This is causing issues when trying to detect configuration drift.

question servicmssql

Most helpful comment

We noticed this was well. In addition to this we also noticed it doesn't set the "Allow Access to Azure Services" switch to "Off" when explicit rules (i.e. not 0.0.0.0) are applied, which is also something we would expect to happen.
Is this observation correct or are we missing something?

All 2 comments

We noticed this was well. In addition to this we also noticed it doesn't set the "Allow Access to Azure Services" switch to "Off" when explicit rules (i.e. not 0.0.0.0) are applied, which is also something we would expect to happen.
Is this observation correct or are we missing something?

I'm getting the same thing when using azurerm_postgresql_firewall_rule. Anyone know if there is any plan to fix this?

Was this page helpful?
0 / 5 - 0 ratings