I am using Terraform to create the infrastructure layer of the solution on Azure.
The below code creates a SQL Connection in Azure however its V1 I want V2 – how to modify the below?
# Create Azure API Connection SQL Connection. This is used by the Logic-App to query the Azure SQL databases.
resource "azapi_resource" "sql_conn" {
type = "Microsoft.Web/connections@2016-06-01"
name = local.sql_connection
parent_id = data.azurerm_resource_group.solution_rg.id
location = var.location
tags = local.tags
body = jsonencode({
properties = {
displayName = "${local.sql_connection}"
statuses = [
{
"status" : "Connected"
}
]
parameterValues = {
name = "managedIdentityAuth"
#values = {}
}
api = {
name = "sql"
displayName = "SQL Server"
description = "Microsoft SQL Server is a relational database management system developed by Microsoft. Connect to SQL Server to manage data. You can perform various actions such as create, update, get, and delete on rows in a table."
iconUri = "https://connectoricons-prod.azureedge.net/releases/v1.0.1686/1.0.1686.3706/sql/icon.png"
brandColor = "#ba141a"
id = "/subscriptions/${data.azurerm_subscription.current.subscription_id}/providers/Microsoft.Web/locations/uksouth/managedApis/sql"
type = "Microsoft.Web/locations/managedApis"
}
}
})
}