Logic App role assigment for 2 containers in different Storage Accounts - bicep issue

Jarno 0 Reputation points
2023-03-23T10:36:10.7533333+00:00

Screenshot 2023-03-23 at 12.19.19

Screenshot 2023-03-23 at 12.19.25

Screenshot 2023-03-23 at 12.19.39

With Bicep we are creating a Standard Logic App.
We have existing resources:
FileStorage -> container
ArchiveStorage -> container

For the logic app, we are assigning 'Storage Blob Data Contributor' role assigments for both containers.
We are facing the following issue:

When we create the resources with Bicep, one assigmnt succeeds and the other one fails with error:
"Tenant ID, application ID, principal ID, and scope are not allowed to be updated."

If we change Role to 'Storage Blob Data Reader' for the one of the resources, they both succeed.
If we change one container name (different container names same role) -> it fails.

Any idea how to assign Same role, to different storage account containers?

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,545 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,203 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,566 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jarno 0 Reputation points
    2023-03-24T08:31:09.6166667+00:00

    We switched from

      name: guid(resourceGroup().id, principalId, roleId, uniqueString(resourceName))
    
    

    to this:

      name: guid(resourceGroup().id, principalId, roleId, roleAssigmentName)
    
    

    We gave the roleAssigmentName a unique name. And this seemed to work.
    We could not solve though, why the uniqueString(resourceName) did not produce a unique value on every run?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.