You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform updates the database scale when changing the sku_name without deleting and recreating the database (where allowed, I'm aware some types of sku changes aren't permitted)
Actual Behavior
Terraform deletes and recreates the database.
Terraform will perform the following actions:
# azurerm_mssql_database.db must be replaced
-/+ resource "azurerm_mssql_database" "db" {
~ auto_pause_delay_in_minutes = 0 -> (known after apply)
collation = "SQL_LATIN1_GENERAL_CP1_CI_AS"
create_mode = "Default"
+ creation_source_database_id = (known after apply)
~ id = "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-sql/databases/test-db" -> (known after apply)
+ license_type = (known after apply)
max_size_gb = 2
~ min_capacity = 0 -> (known after apply)
name = "test-db"
~ read_replica_count = 0 -> (known after apply)
read_scale = false
+ restore_point_in_time = (known after apply)
+ sample_name = (known after apply)
server_id = "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-sql"
~ sku_name = "S0" -> "S1" # forces replacement
- tags = {} -> null
~ zone_redundant = false -> (known after apply)
~ threat_detection_policy {
~ disabled_alerts = [] -> (known after apply)
~ email_account_admins = "Disabled" -> (known after apply)
~ email_addresses = [] -> (known after apply)
~ retention_days = 0 -> (known after apply)
~ state = "Disabled" -> (known after apply)
+ storage_account_access_key = (sensitive value)
+ storage_endpoint = (known after apply)
~ use_server_default = "Disabled" -> (known after apply)
}
}
Plan: 1 to add, 0 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
azurerm_mssql_database.db: Destroying... [id=/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-sql/databases/test-db]
azurerm_mssql_database.db: Still destroying... [id=/subscriptions/xxxx...test-sql/databases/test-db, 10s elapsed]
azurerm_mssql_database.db: Destruction complete after 18s
azurerm_mssql_database.db: Creating...
azurerm_mssql_database.db: Still creating... [10s elapsed]
azurerm_mssql_database.db: Still creating... [20s elapsed]
azurerm_mssql_database.db: Still creating... [30s elapsed]
azurerm_mssql_database.db: Still creating... [40s elapsed]
azurerm_mssql_database.db: Still creating... [50s elapsed]
azurerm_mssql_database.db: Still creating... [1m0s elapsed]
azurerm_mssql_database.db: Creation complete after 1m1s [id=/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-sql/databases/test-db]
Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
Steps to Reproduce
terraform apply to initially to create the database.
Modify the sku_name to change the database scale (e.g. S0 -> S1).
terraform apply again.
Important Factoids
References
The text was updated successfully, but these errors were encountered:
Hi @samcook ,thanks for opening this issue. It just the HS can't be switched to other sku_tier. I'll fix this and do a customDiff for the sku_name soon.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Aug 5, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_mssql_database
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Terraform updates the database scale when changing the
sku_name
without deleting and recreating the database (where allowed, I'm aware some types of sku changes aren't permitted)Actual Behavior
Terraform deletes and recreates the database.
Steps to Reproduce
terraform apply
to initially to create the database.sku_name
to change the database scale (e.g.S0 -> S1
).terraform apply
again.Important Factoids
References
The text was updated successfully, but these errors were encountered: