Open JiriKovar opened 2 years ago
I'm having a similar problem with an Azure Blob Storage connection. Here, it appears that Managed Identity authentication is configured by the property "parameterValueSet": { "name": "managedIdentityAuth", "values": {}}
which is still unsupported by the azurerm provider #16818
An alternative way to create Azure connection is use azapi_resource resource. For example
resource "azapi_resource" "automation_connection" {
type = "Microsoft.Web/connections@2016-06-01"
name = "azureautomation"
location = azurerm_resource_group.rg.location
parent_id = azurerm_resource_group.rg.id
schema_validation_enabled = false
body = jsonencode({
properties = {
customParameterValues = {}
alternativeParameterValues = {},
parameterValueType = "Alternative",
api = {
name = "azureautomation"
displayName = "Azure Automation"
description = "Azure Automation provides tools to manage your cloud and on-premises infrastructure seamlessly."
id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}/providers/Microsoft.Web/locations/${azurerm_resource_group.rg.location}/managedApis/azureautomation"
type = "Microsoft.Web/locations/managedApis"
}
}
})
}
I have a similar problem connecting with managed identity to an SQL database. Furthermore, due to a broken connection, later manual configuration is not possible.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.4
AzureRM Provider Version
3.30.0
Affected Resource(s)/Data Source(s)
azurerm_api_connection
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I expect this to work like it used to (the last observed working time was 2021-11-02T08:27:17.4938458Z). We have been able to work around this issue by rolling back to ARM template usage. The ARM template of the API connection looks like this:
Actual Behaviour
It fails with the output mentioned above.
Steps to Reproduce
Please see the configuration provided above:
It looks like it's somwhow connected to the empty "nonSecretParameterValues" object in the ARM template (or at least that's the only difference we have been able to observe). Please compare the following results:
Here is the ARM template export from the Azure Portal of the OLD connection that works:
Here is an export of the newly created connection that works and is created by the ARM template mentioned above (the workaround):
And here is the broken one created today by the "azurerm_api_connection" resource:
Important Factoids
No response
References
No response