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

Vault not found in subscription fix while Azure Subscription has many vaults #609

Merged

Conversation

sergiisinienok
Copy link
Contributor

While using this repo to deploy my Azure Marketplace offers, I faced an error: The Vault '{vaultname}' not found within subscription.

After investigating a bit, I found that az keyvault set-policy --name $KeyVault --object-id $WebAppNamePortalId --secret-permissions get list --key-permissions get list --output $azCliOutput in Deploy.ps1 has some kind of a paging by default and if your Azure Subscription has many vaults, you newly created might not be returned. This leads to The Vault '{vaultname}' not found within subscription. error and unpredictable behavior of the solution.

I found an easy fix for this issue by adding a filter by the resource group.

Hope that it will be helpful to somebody.

@santhoshb-msft santhoshb-msft self-requested a review November 29, 2023 00:17
@santhoshb-msft santhoshb-msft self-assigned this Nov 29, 2023
@santhoshb-msft santhoshb-msft added enhancement A request for new functionality or improvement bug Something isn't working and removed enhancement A request for new functionality or improvement labels Nov 29, 2023
@santhoshb-msft santhoshb-msft linked an issue Nov 29, 2023 that may be closed by this pull request
Copy link
Contributor

@santhoshb-msft santhoshb-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this contribution. tested and access policies are assigned correctly

@santhoshb-msft santhoshb-msft merged commit 7b33abc into Azure:main Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Vault vaultname not found within subscription.
2 participants