Azure-Player / azure.datafactory.tools

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

ADFT0015: Type [managedVirtualNetwork\default\managedPrivateEndpoint] is not supported #131

Closed PlotlessMind closed 3 years ago

PlotlessMind commented 3 years ago

Many thanks for all of your work on this, it is very much appreciated. I've been trying to get the Private EndPoints working in your latest release but still get the same error mentioned by my coleague Golovac in the linked issue that has been closed:

ADFT0015: Type [managedVirtualNetwork\default\managedPrivateEndpoint] is not supported

Is this due to the JSON files for these objects being stored in an unusual location compared to Data Factories other objects: DataFactory\managedVirtualNetwork\default\managedPrivateEndpoint? I've tried using different values in the Options file: managedVirtualNetwork\default\managedPrivateEndpoint. or managedPrivateEndpoint. but to no avail. Any pointers on what I may be doing wrong are much appreciated, otherwise I assume there is still an issue when trying to configure private endpoints using this tool.

Originally posted by @PlotlessMind in https://github.com/SQLPlayer/azure.datafactory.tools/issues/95#issuecomment-906813073

NowinskiK commented 3 years ago
Get-Module -Name "Az.DataFactory"
Remove-Module azure.datafactory.tools -ErrorAction:Ignore
Import-Module ".\azure.datafactory.tools.psd1" -Force
Get-Module azure.datafactory.tools
$ErrorActionPreference = 'Stop'

$ResourceGroupName = 'rg-datafactory'
$Location = "NorthEurope"
$RootFolder = ".\test\BigFactorySample2_vnet"
$DataFactoryName = 'BigFactorySample2-test'

# Deploy ADF without one LS:
$o = New-AdfPublishOption 
$o.Excludes.Add('*.LS_SqlServer_DEV19_AW2017', '')
Publish-AdfV2FromJson -RootFolder "$RootFolder" -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$DataFactoryName" `
      -Location "$Location" -Option $o

Output:

===================================================================================
STEP: Deployment of all ADF objects...
Start deploying object: [linkedService].[LS_AzureSqlDb_AW2014_viaMVN_MI] (1 dependency/ies)
Start deploying object: [IntegrationRuntime].[AzureIR-VnetEnabled] (1 dependency/ies)
Start deploying object: [managedVirtualNetwork].[default] (0 dependency/ies)
Finished deploying object: [managedVirtualNetwork].[default]
Finished deploying object: [IntegrationRuntime].[AzureIR-VnetEnabled]
Finished deploying object: [linkedService].[LS_AzureSqlDb_AW2014_viaMVN_MI]

Code is in this repo. If something is not working - give me code and files, so I can reproduce the issue.