Azure-Player / azure.datafactory.tools

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

Test-AdfCode - ADFT0015: Type [credential] is not supported #331

Closed stephennaughton closed 1 year ago

stephennaughton commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Similar to https://github.com/Azure-Player/azure.datafactory.tools/issues/156

I am attempting to parameterise the value assigned to an ADF Credential using a CSV configuration file. The credential type is a User Assigned Managed Identity. It looks like from my reading of previous issues that support for this was added recently.

I came across an issue when running "Test-AdfCode" on my ADF repo. The CSV file provided as the stage parameter includes something similar to the following:

credential,CRD_UAMI_ADS,$.properties.typeProperties,"<JSON value including managed identity resource id>"

When I run Test-AdfCode on this pre-publish, I get the following:

Validation of config file completed.
ERROR: ADFT0015: Type [credential] is not supported.

This error is thrown in private/Get-AdfObjectByPattern.ps1 which looks like it doesn't support Credentials. However I notice that Credentials are supported in private/Get-AdfObjectByName.ps1

Am I correct in assuming that credentials are supported by the this tool? Is there something that I'm missing when setting the value in the CSV maybe?

Thank you for your time on this.

To Reproduce Your script to reproduce the behaviour:

Your script here

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Version of PowerShell module of:

Provide all files to reproduce the issue

NowinskiK commented 1 year ago

You're right. Credentials are now supported, so this is a bug.