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

Fix handling of creating an Access Policy for a non-existent Key Vault #2922

Merged
merged 2 commits into from
Feb 21, 2019
Merged

Fix handling of creating an Access Policy for a non-existent Key Vault #2922

merged 2 commits into from
Feb 21, 2019

Commits on Feb 20, 2019

  1. Add acctest for Key Vault Policy with bad Vault ID

    This commit adds an acceptance test reproducing the scenario of attempting to
    create an `azurerm_key_vault_access_policy` resource when specifying the ID of a
    Key Vault which does not exist, but is in the correct URI-path-style format. It
    generates these by appending the string "NOPE" to the ID of a valid Key Vault
    (which the tests creates), but could equally truncate the name (which is how
    this was encountered in the first place).
    
    Applying this particular configuration, I expect an error - probably of the form
    "Error retrieving Key Vault" (but the exact text is arbitrary). Instead, we see
    that no error is produced.
    
    If this scenario is run via the CLI, the CLI marks the resource as successfully
    created, but no state is created for it.
    jen20 committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    0cfd63c View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2019

  1. Remove key vault policy from state iff it existed

    This fixes the test added in the previous commit, while retaining the ability to
    reflect access policy deletion by deleting the key vault itself.
    jen20 committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    e99279b View commit details
    Browse the repository at this point in the history