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

Error when deleting credentials #403

Open
cberthold opened this issue Jul 23, 2024 · 1 comment
Open

Error when deleting credentials #403

cberthold opened this issue Jul 23, 2024 · 1 comment
Labels
triage Issue is under investigation

Comments

@cberthold
Copy link

Describe the bug
An error is generated, using version 1.9.1, for missing variable $adfi when trying to remove a credential that is no longer in config files.

It appears on line 16 $adfi should be $adfInstance which then generates the error inside of Remove-AdfObject.ps

$url = "https://management.azure.com$($adfi.DataFactoryId)/$type_plural/$($name)?api-version=2018-06-01"

Exception: /home/runner/.local/share/powershell/Modules/azure.datafactory.tools/1.9.1/private/Remove-AdfObject.ps1:134
Line |
 134 |          throw $ErrorMessage
     |          ~~~~~~~~~~~~~~~~~~~
     | The variable '$adfi' cannot be retrieved because it has not been set.
Error: Process completed with exit code 1.

To Reproduce
Your script to reproduce the behaviour:

1. Create credential
2. Deploy nothing
3. See error

Expected behaviour
Credential was deleted

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

Version of PowerShell module of:

  • ver 1.9.1

Provide all files to reproduce the issue

  • Attach at least log file (you can wipe out any potentially sensitive info)
  • Attach files of objects which are involved in the process
@cberthold cberthold added the triage Issue is under investigation label Jul 23, 2024
@NowinskiK
Copy link
Member

To be precise: Is this happening when you use DeleteNotInSource flag enabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is under investigation
Projects
None yet
Development

No branches or pull requests

2 participants