Closed luxiconn closed 1 year ago
Thanks for opening this issue. After checked, seems api doesn't return the value of license type. So I raised an issue on Azure/azure-rest-api-specs#10715.
@neil-yechenwei Apparently the linked issue is now resolved.
Any update on this? The issue raised in Azure was fixed months ago.
For what it worths, here is how I workaround this bug :
resource "azurerm_mssql_database" "this" {
# [...]
lifecycle {
ignore_changes = [
license_type
]
}
}
Thanks for opening this issue. After checked, seems api doesn't return the value of license type. So I raised an issue on Azure/azure-rest-api-specs#10715.
The LicenseType property does get returned if the database was created using the latest api version.
Any update on this? Still an issue in the 3.7.0 version of the azurerm provider.
I'm not running into this issue in AzureRM 3.11.
Terraform v1.0.5
on darwin_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.11.0
Looking at Azure Portal, I believe that license_type
only applies to vCore-based purchasing models (e.g. where sku_name
is GP_Gen*
, BC_*
, etc.). Any attempt to set it for any other SKU appears to be ignored by the API.
Note: It looks as if Azure Portal is incorrectly displaying the specified license type. LicenseIncluded
is displayed as No whereas BasePrice
is displayed as Yes. I confirmed the correct setting is applied using AZ CLI: https://docs.microsoft.com/en-us/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-show.
Seeing this issue as well. Still happening on provider version 3.24.0
.
Come on Hashicorp. 2 Years? Doesn't inspire confidence to start a new project with Terraform.
Can someone remove "upstream-microsoft" tag, as it seems to be solved already
Perhaps @ArcturusZhang or @tombuildsstuff
It seems like this may have just been fixed in v3.30.0? https://github.com/hashicorp/terraform-provider-azurerm/pull/19084
UPDATE: Confirmed fixed.
closing as @jaredbrogan as confirmed its been fixed
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_mssql_database
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
If I don't change anything in the resource terraform should now show the state different than what is deployed
Actual Behavior
Every time we run
terraform plan
it acts like there is a change in the license type even though no change was made.Steps to Reproduce
terraform apply
Important Factoids
References