Open JCP13 opened 1 year ago
@JCP13 thanks for opening this issue. Per the error provided above, the error states that the config value for next_hop_type
should be VnetLocal
instead of vnetlocal
. It is case sensitive. Could you update it and try again?
My apologies @sinbai,
I copied the wrong error messages. I edit the issue with the correct one. A solution was found. As it turn out it had to do with the password, it was not complex enough so it failed but did not provided a proper error message. Once I created an acceptable password, I was able to create the MSSQL MI.
Thank you for looking into it.
Cheers.
Hello, will anyone look into fixing the error message issue?
@sinbai will someone look into fixing the error message issue?
Hi, thanks for reporting this. Whilst at the moment it's not feasible for us to fix the handling of this error message, we may be able to improve on the handling in future when we move away from the go-autorest transport SDK.
I have been getting this same error message in azurerm version 3.96.0 and wanted to include a work around for people encountering this issue and running across this article.
When getting this error message with a azurerm_mssql_managed_instance resource, from the Azure Portal go to Subscriptions > choose the subscription you are deploying this terraform resource to > Check Activity Logs. (Note: You may need to give the log 5 minutes before it will populate the failure.)
From the subscription Activity log you will see a failure event such as "Prepares a subnet by applying necessary Network Policies". If you open there error it is not terribly descriptive, but when you click on the JSON tab, it will provide a Properties field that will tell you more about the error encountered.
Example:
"submissionTimestamp": "2024-03-28T16:08:36Z",
"subscriptionId": "
In the above example, though it looks like the subnet was not created with the proper delegation settings for the SQL MI resource, by reviewing the properties field, it is clear that the issue is with a separate dependent resource, namely a route table and its association, with the target subnet used by the MI.
Hopefully this will assist others in drilling into this vague error and potentially serve as a source of truth that the Terraform azurerm module in the future, should a fix be possible.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.3
AzureRM Provider Version
3.28.0
Affected Resource(s)/Data Source(s)
azurerm_virtual_network_gateway
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The provision of the azurerm_virtual_network_gateway is to be successful.
Actual Behaviour
╷ ││ Error: waiting for creation of Managed Instance: (Name "tableau-mssql" / Resource Group "tableau-rg"): Code="Failed" Message="The async operation failed." AdditionalInfo=[{"id":"/subscriptions/””/resourceGroups/tableau-rg/providers/Microsoft.Sql/managedInstances/tableau-mssql","location":"westus3","name":"tableau-mssql","properties":{"administratorLogin":"mradministrator","collation":"SQL_Latin1_General_CP1_CI_AS","licenseType":"BasePrice","maintenanceConfigurationId":"/subscriptions/””/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default","minimalTlsVersion":"1.2","privateEndpointConnections":[],"provisioningState":"Failed","proxyOverride":"Default","publicDataEndpointEnabled":false,"state":"CreationFailed","storageAccountType":"GRS","storageSizeInGB":32,"subnetId":"/subscriptions/''/resourceGroups/tableau-rg/providers/Microsoft.Network/virtualNetworks/vnet-tableau/subnets/tableau-mssql-Subnet","timezoneId":"UTC","vCores":4,"zoneRedundant":false},"sku":{"capacity":4,"family":"Gen5","name":"GP_Gen5","tier":"GeneralPurpose"},"tags":{},"type":"Microsoft.Sql/managedInstances"}] │ │ with azurerm_mssql_managed_instance.mssql, │ on 04-01-MSSQL.tf line 1, in resource "azurerm_mssql_managed_instance" "mssql": │ 1: resource "azurerm_mssql_managed_instance" "mssql" { │ │ waiting for creation of Managed Instance: (Name "tableau-mssql" / Resource Group "tableau-rg"): Code="Failed" Message="The async operation failed." │ AdditionalInfo=[{"id":"/subscriptions/””/resourceGroups/tableau-rg/providers/Microsoft.Sql/managedInstances/tableau-mssql","location":"westus3","name":"tableau-mssql","properties":{"administratorLogin":"mradministrator","collation":"SQL_Latin1_General_CP1_CI_AS","licenseType":"BasePrice","maintenanceConfigurationId":"/subscriptions/””/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default","minimalTlsVersion":"1.2","privateEndpointConnections":[],"provisioningState":"Failed","proxyOverride":"Default","publicDataEndpointEnabled":false,"state":"CreationFailed","storageAccountType":"GRS","storageSizeInGB":32,"subnetId":"/subscriptions/''/resourceGroups/tableau-rg/providers/Microsoft.Network/virtualNetworks/vnet-tableau/subnets/tableau-mssql-Subnet","timezoneId":"UTC","vCores":4,"zoneRedundant":false},"sku":{"capacity":4,"family":"Gen5","name":"GP_Gen5","tier":"GeneralPurpose"},"tags":{},"type":"Microsoft.Sql/managedInstances"}]
Steps to Reproduce
please run this code: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_instance
Important Factoids
No response
References
No response