Make sure the content type for the custom connection is present in the deployment scope or template parameters of your main template to resolve issue.
In order to fix this warning refer this Connection resource definition of ARM template for Logic app and make sure your template.json that contains custom connector is properly formatted.
In your main deployment file, azdeploy.json add the parameter for custom connector like below:-
"parameters": {
"customConnectorContentType": {
"type": "string",
"defaultValue": "application/vnd.microsoft.appconnect.connectordefinition+json",
"metadata": {
"description": "Content type for the custom connector."
}
}
}
In your nested template , Pass the content-type parameter like below:-
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"name": "custom_connector_template_link",
"dependsOn": [],
"properties": {
"mode": "Incremental",
"templateLink": {
"relativePath": "custom_connector/template.json"
},
"parameters": {
"contentVersion": {
"value": "[parameters('customConnectorContentType')]"
}
}
}
}
Another sample you can try is the below one:-
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"type": "string",
"metadata": {
"description": "The name of the Logic App to create."
}
},
"customConnectorTemplateUrl": {
"type": "string",
"metadata": {
"description": "The URL of the ARM template for the custom connector."
}
}
},
"variables": {
"customConnectorDeploymentName": "[concat('customConnectorDeployment-', uniqueString(resourceGroup().id))]"
},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[parameters('logicAppName')]",
"location": "[resourceGroup().location]",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"Recurrence": {
"type": "Recurrence",
"recurrence": {
"frequency": "Hour",
"interval": 1
}
}
},
"actions": {
"CustomConnectorDeployment": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"name": "[variables('customConnectorDeploymentName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[parameters('customConnectorTemplateUrl')]"
}
}
}
},
"outputs": {}
},
"parameters": {}
}
}
]
}
My Azure yaml pipeline script:-
steps:
- task: AzureResourceManagerTemplateDeployment@3
displayName: 'ARM Template deployment: Resource Group scope'
inputs:
azureResourceManagerConnection: 'SID subscription(xxxx4xxxe97cb2a7)'
subscriptionId: 'xxxxxdxxxe2b6e97cb2a7'
resourceGroupName: siliconrg32
location: 'Australia East'
csmFile: '$(System.DefaultWorkingDirectory)/_azurelogicapps/azdeploy.json'