Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic Apps with managed identities not supported #949

Closed
smokedlinq opened this issue Nov 18, 2020 · 6 comments
Closed

Logic Apps with managed identities not supported #949

smokedlinq opened this issue Nov 18, 2020 · 6 comments

Comments

@smokedlinq
Copy link

Bicep version
0.2.14 (both bicep and VSCode extension)

Describe the bug
When defining Logic App resources like below, VSCode states that the identity property is not allowed (BCP038), or when using the resource reference that the resource does not contain that property (BCP053).

param logicAppDefinition object = {}
param containerId string

resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
  name: 'logic-app'
  location: resourceGroup().location
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    state: 'Enabled'
    definition: logicAppDefinition.definition
  }
}

resource logicAppStorageBlobDataContributor 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
  name: guid('${containerId}-${logicApp.name}-ba92f5b4-2d11-453d-a403-e96b0029c9fe')
  properties: {
    roleDefinitionId: '${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe'
    principalId: logicApp.identity.principalId
  }
}

To Reproduce
Try to define a logic app resource with a managed identity.

Additional information
The build also fails with similar errors.

@smokedlinq smokedlinq changed the title Logic Apps with managed identities now supported Logic Apps with managed identities not supported Nov 18, 2020
@smokedlinq
Copy link
Author

smokedlinq commented Nov 18, 2020

FYI - I can get around this by using version 2017-07-01 but get a warning about that resource type does not have types available (BCP081) ... I didn't see the 2019-05-01 version listed on the schema for https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json

@ghost ghost added the Needs: Triage 🔍 label Nov 18, 2020
@alex-frankel
Copy link
Collaborator

We'll need the logicapp team to fix their swagger definition. The identity property is not declared as an allowed property:
https://docs.microsoft.com/en-us/azure/templates/microsoft.logic/2019-05-01/workflows

Compare this to ACI, which does have identity declared:
https://docs.microsoft.com/en-us/azure/templates/microsoft.containerinstance/containergroups

Looks like it is also missing from 2016-06-01, but their doc shows using the identity property: https://docs.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity#create-user-assigned-identity-in-an-azure-resource-manager-template

So assuming that doc is right, this should just be a swagger docs problem.

@smartpcr
Copy link

Error BCP038: The property "identity" is not allowed on objects of type "Microsoft.Web/sites".

@miqm
Copy link
Collaborator

miqm commented Mar 22, 2021

@alex-frankel - perhaps to avoid such issues in future in bicep, we could introduce some technique i.e. @ignoreInvalidProperty('propertyName') decorator?

@miqm
Copy link
Collaborator

miqm commented Jun 17, 2021

@alex-frankel Any update on this? Nvmd, I saw comment on #3000

@anthony-c-martin
Copy link
Member

Fixed in Bicep v0.4.1008.

@ghost ghost locked as resolved and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants