0

I'm trying to write an ARM template to deploy a connection to the storage account for my Logic App. The problem is that my Logic App belongs to one resource group & the storage account in another.

When I run the deployment pipeline I get the following deployment error:

The Resource 'Microsoft.Storage/storageAccounts/StorageAccountName' under resource group 'Logic App Resource Group' was not found.

I understand that the storage account does not belong to this resource group but how do I write the ARM template to look for the storage account from another group?

Here is my template for the connection:

 {
          "type": "Microsoft.Web/connections",
          "apiVersion": "2016-06-01",
          "name": "[parameters('storageConName')]",
          "location": "[parameters('logicAppLocation')]",
          "properties": {
            "displayName": "[parameters('storageConName')]",
            "parameterValues": {
              "accountName": "[parameters('storageAccountName')]",
              "accessKey": "[listKeys(variables('storageAccountId'),'2019-06-01').keys[0].value]"
            },
            "api": {
              "id": "[concat('/subscriptions/',parameters('resourceGroupId'),'/providers/Microsoft.Web/locations/northeurope/managedApis/azureblob')]"
            }
          }
        }
Redseven
  • 77
  • 1
  • 7

1 Answers1

0

I've worked out what was wrong, the properties:api:id was using the logic App resource group id where it should be using the storage accounts resource group id.

I misunderstood that this was the resource group where I wanted the connection to be created.

Redseven
  • 77
  • 1
  • 7