azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

Being prompted for values specified in parameters file.

Open atrauzzi opened this issue 7 years ago • 8 comments

I have the following in my template:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "vm_public_key": {
            "type": "String"
        }
    },
...

And a parameters file with the following:

{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "vm_public_key": {
            "reference": {
                "keyVault": {
                    "id": "/subscriptions/..."
                }, 
                "secretName": "vm-public-key" 
            }
        }
    }
}

Yet every time I try to validate the template, I get prompted for the parameter, even though I'm supplying in the parameters json file in the command.

atrauzzi avatar Nov 15 '16 15:11 atrauzzi

Hey @atrauzzi : what version of xplat-cli are you using? we fixed similar issues in this space with the 0.10.7 release. Could you please see if it still repoes in the latest release? thanks.

balajikris avatar Nov 16 '16 00:11 balajikris

I was running the latest when I wrote that.

atrauzzi avatar Nov 16 '16 01:11 atrauzzi

@ravbhatnagar @andrew-mestas @vivsriaus - Can you guys take a look at this issue?

amarzavery avatar Nov 16 '16 01:11 amarzavery

@vivsriaus I think it might be related to "reference" values which we are not able to resolve? @atrauzzi - Thanks for reporting. We will take a look.

ravbhatnagar avatar Nov 16 '16 01:11 ravbhatnagar

Same issue with 0.10.7.

Another machine with 0.10.4 has no problem.

Regression ?

davinkevin avatar Dec 02 '16 13:12 davinkevin

@davinkevin - Is it the same scenario as above where you are using a Keyvault reference in your params file to get the value?

ravbhatnagar avatar Dec 02 '16 18:12 ravbhatnagar

Yes, totally identical...

Le ven. 2 déc. 2016 à 19:53, Gaurav Bhatnagar [email protected] a écrit :

@davinkevin https://github.com/davinkevin - Is it the same scenario as above where you are using a Keyvault reference in your params file to get the value?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-xplat-cli/issues/3317#issuecomment-264532435, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4S6j0sRDEgQ-edTzFnWdqCCj2Ml21Wks5rEGkzgaJpZM4KyrbV .

--

Davin Kevin

davinkevin avatar Dec 02 '16 19:12 davinkevin

This is due to the way the check is ran. Right now it will acknowledge parameters in the form of

parameters : { parameterName: { value: "..." } }

I'm linking the page where Amar mentions a non-interactive mode which when set will throw an error instead of prompting the user for an input. https://github.com/Azure/azure-xplat-cli/issues/3285

I'll talk with @vivsriaus and @ravbhatnagar about this scenario.

andrew-mestas avatar Dec 08 '16 07:12 andrew-mestas