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

Test-AzDeployment in Az.Resources 2.5.0 issue when using securestring type parameter #12819

Closed
thijsvanbloemendaal opened this issue Sep 1, 2020 · 8 comments
Labels
ARM - Templates customer-reported question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@thijsvanbloemendaal
Copy link

I'm getting errors since version 2.5.0 of Az.Resources.
How to reproduce:
executed powershell code:

import-module Az.Resources -RequiredVersion 2.5.0 -force
$token = (ConvertTo-SecureString "sasTokenString" -AsPlainText -force)

Test-AzDeployment `
          -Location "location" `
          -TemplateFile "template file" `
          -_artifactsLocationSasToken $token `
          -Verbose

Throws: InvalidTemplate - Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'String, Uri'. Actual 'Object'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.

The template ARM file contains the json:

"_artifactsLocationSasToken": {
            "type": "securestring"
        }

On version 2.4.0 I receive the expected output.
The same happens on the New-AzDeployment.

Was something changed on this version? Can't find a breaking change on this in de release notes.

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 1, 2020
@dingmeng-xue
Copy link
Member

@shenglol , Is it the same issue as #12792?

@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 2, 2020
@dingmeng-xue dingmeng-xue added the Service Attention This issue is responsible by Azure service team. label Sep 2, 2020
@ghost
Copy link

ghost commented Sep 2, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.

@thijsvanbloemendaal
Copy link
Author

@shenglol , Is it the same issue as #12792?

Seems to be related indeed! Other cmdLets though, but probably the same fix.

@shenglol
Copy link
Contributor

shenglol commented Sep 2, 2020

@dingmeng-xue, yes it's the same issue.

@nevergonnagityouup
Copy link

Having the same issue in an Azure Automation Runbook running version 2.5.0 there as well. Happy I found this thread cause I was looking everywhere for what was going on.

@codeevaluator
Copy link

codeevaluator commented Sep 15, 2020

+1 same issue for us, using Azure DevOps.

@shenglol
Copy link
Contributor

Az 4.7.0 and Az.Resources 2.5.1 contain a fix to the issue and were released yesterday. Closing the issue.

@PaulVrugt
Copy link

omg, lost half a day to find out why the deployment using azure pipelines stopped working. Please update the hosted pipeline images!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM - Templates customer-reported question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

6 participants