Hi @Gabriel-2005
Welcome to Microsoft Q&A platform and thanks for posting your query here.
I understand you're encountering an issue with your Bicep deployment for Azure Data Factory (ADF), specifically regarding the identity
property. Let's address this step by step.
Issue:
The template output 'dfId' is not valid: The language expression property 'identity' doesn't exist, available properties are 'apiVersion, location, tags, etc...
This error suggests that the identity
property isn't defined in your ADF resource, which is why accessing adf.identity.principalId
results in an error.
Solution:
To resolve this, you need to enable Managed Identity for your Azure Data Factory instance. Here's how you can modify your Bicep template:
- In your sub-module (
CTaxRebate.dataFactory.bicep
), update the ADF resource to include theidentity
property:
By adding theparam adfName string resource adf 'Microsoft.DataFactory/factories@2018-06-01' = { name: adfName location: resourceGroup().location identity: { type: 'SystemAssigned' } } output dfId string = adf.identity.principalId
identity
block withtype: 'SystemAssigned'
, you're enabling a system-assigned managed identity for the Data Factory. - After making this change, redeploy your Bicep template using the
New-AzResourceGroupDeployment
cmdlet. This should provision the Data Factory with the managed identity enabled, and theidentity
property will be available as expected.
The identity
property isn't included by default when deploying an Azure Data Factory. Explicitly defining it in your Bicep template ensures that the Data Factory is created with a managed identity, allowing you to reference adf.identity.principalId
without issues.
For more information on configuring managed identities in Azure Data Factory, you can refer to the official documentation.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.