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

Using existing KeyVault secret for Parameters #48

Open
chwilfing opened this issue Feb 3, 2021 · 0 comments
Open

Using existing KeyVault secret for Parameters #48

chwilfing opened this issue Feb 3, 2021 · 0 comments

Comments

@chwilfing
Copy link

Hi,

I'm currently building some samples for a customer to deploy partial environments building one on another. The issue I see or probably don't understand is using KeyVault Secrets of existing keys as input to blueprint artifacts. In my case I've an existing keyvault based on a blueprint created which is working fine. The next blueprint will create a single VM referencing the admin password of the already existing keyvault but the keyvault id for the secret is built with the resourceid function and i can't get it to work. Example:

Blueprint artifact of the Virtual machine / parameters section:

"AdminPassword": {
    "reference": {
        "keyVault": {
            "id": "[resourceId(parameters('bpKeyVaultRG'), 'Microsoft.KeyVault/vaults', parameters('bpKeyVaultName'))]"
        },
        "secretName": "[parameters('bpVMAdmin')]"
    }
},

this way i get an error opening the blueprint blade in the portal:

image

Even if I hardcode the values of id / secretname - the error stays.

The idea is to have the path to the keyvault built based on some of the parameters built and reference the secret without knowing / hardcoding the keyvault ID / path.
My understanding was, the parameters section of the artifact file replaces the parameters file of a arm template and therefore should work with using reference int he parameters section.

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

No branches or pull requests

1 participant