Adding sql_instance
with defaults in azurerm_mssql_virtual_machine
resource recreates whole resource.
#21318
Labels
sql_instance
with defaults in azurerm_mssql_virtual_machine
resource recreates whole resource.
#21318
Is there an existing issue for this?
Community Note
Terraform Version
1.3.6
AzureRM Provider Version
3.50.0
Affected Resource(s)/Data Source(s)
azurerm_mssql_virtual_machine
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Adding
sql_instance
optional block without modifying default values forcollation
,instant_file_initialization_enabled
andlock_pages_in_memory_enabled
shouldn't cause whole resource recreation.Actual Behaviour
Terraform try to recreate
azurerm_mssql_virtual_machine
resource when added sql_instance block to existing resource.Adding
sql_instance[0]
toignore_changes
doesn't help.When I commented out
sql_instance
andignore_changes
block it doesn't return recreationThe interesting thing is that this
sql_instance
block is visible in the state file for this resource even though I didn't run theterraform apply
command.Not sure if it is important fact but when I run
terraform plan
with debug logging, I see that HTTP response body aboutazurerm_mssql_virtual_machine
showsproperties.serverConfigurationsManagementSettings.sqlInstanceSettings
is empty[DEBUG] provider.terraform-provider-azurerm_v3.50.0_x5: AzureRM Response for https://management.azure.com/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/xxx?%24expand=%2A&api-version=2022-02-01
Steps to Reproduce
sql_instance
block -terraform apply
sql_instance
block with default values -terraform plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: