Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
207 stars 69 forks source link

Purview configuration gets overwritten when deploy Global Parameters using ADF deployment task #343

Closed Spsutar closed 1 year ago

Spsutar commented 1 year ago

We deploy the below purview configuration using Bicep template via ADO pipeline along with ADF instance deployment. But when ADF objects are deployed using ADF deployment task, this configuration gets removed. I have even tried creating this configuration manually on ADF portal. Also after this configuration added to the ADF portal (either manually or Bicep) and when you export the ARM template, this configuration does not show up in the ARM, or in the git branch files. So we have no way to exclude overwriting it in the deployment task.

image

To Reproduce


Your script here
ADF deployment task looks like this:
 - task: SQLPlayer.DataFactoryTools.PublishADF.PublishADFTask@1
    displayName: 'Publish ADF Objects to ADF instance'
    inputs:
      azureSubscription: ${{ parameters.paramAzureSubscription }}
      ResourceGroupName: ${{ parameters.paramIngResourceGroupName }}
      DataFactoryName: ${{ parameters.paramfactoryName }}
      DataFactoryCodePath: $(Pipeline.Workspace)\drop
      Location: ${{ parameters.paramLocation }}
      IncrementalDeployment: true
      StageCode: ${{ parameters.environment }}
      CreateNewInstance: false
      FilteringType: Inline
      FilterText: |
       -integrationRuntime.*
       -managedVirtualNetwork*.*
       -*managedPrivateEndpoint.*
       -trigger.*

**Version of PowerShell module of:**
 - ver...NA......

**Provide all files to reproduce the issue**
Bicep code snippet to deploy the Purview Config via IaC

// Resources
resource datafactory 'Microsoft.DataFactory/factories@2018-06-01' = {
  name: datafactoryName
  location: location
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    globalParameters: !empty(adfglobalParameters) ? adfglobalParameters:{}   
    publicNetworkAccess: 'Disabled'
    purviewConfiguration: isPurviewdeployed ?{
      purviewResourceId: purviewId
    }:null
    repoConfiguration: env == 'dev'? {
      accountName: 'ADO-ORGName'
      collaborationBranch: 'develop'
      repositoryName: 'Repo'
      rootFolder: '/ADF'
      type: 'FactoryVSTSConfiguration'
      projectName: 'ADO-ProjectName'
    }:null
  }
}
NowinskiK commented 1 year ago

Resolved in ver.1.6.1 - currently in preview.