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

Keyvault storage permissions #3081

Merged
merged 5 commits into from
Mar 27, 2019

Conversation

Lucretius
Copy link
Contributor

@Lucretius Lucretius commented Mar 20, 2019

Resolves #2405

I've also updated the documentation to reflect that all permissions blocks are optional. They are marked so in the code but the documentation said some of them were required.

Tests have all been updated. Also created the resource using local binary and saw the expected storage permissions when reading them out with the data source.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @Lucretius

Thanks for this PR :)

I've taken a look through and left a couple of comments inline but this is otherwise looking pretty good to me; if we can fix those up we should be able to get this merged 👍

Thanks!

azurerm/helpers/azure/key_vault_access_policy.go Outdated Show resolved Hide resolved
azurerm/resource_arm_key_vault_certificate_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_key_vault_migration.go Outdated Show resolved Hide resolved
azurerm/resource_arm_key_vault_migration_test.go Outdated Show resolved Hide resolved
"access_policy.0.storage_permissions.10": "restore",
"access_policy.0.storage_permissions.11": "set",
"access_policy.0.storage_permissions.12": "setsas",
"access_policy.0.storage_permissions.13": "update",
Copy link
Contributor

Choose a reason for hiding this comment

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

(as above) could we remove this?

Copy link
Contributor Author

@Lucretius Lucretius Mar 20, 2019

Choose a reason for hiding this comment

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

Did you want to remove the v0_1_all test case? Or just the two storage ones that I had added? I will remove the two storage ones since its a new property and there will be no state to migrate. I can change the all test so that it doesnt try to handle the all property value for storage since it never existed.

Copy link
Contributor

Choose a reason for hiding this comment

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

thinking about this some more, could we revert the changes in resource_arm_key_vault_migration_test.go? since there's no need to test for them in the state migration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I attempted to revert the test file but tests began failing. It appears that the migration tests, at minimum, all expect a terraform output of
access_policy.0.storage_permissions.#:0. Right now, the tests just include a single storage permission, and that storage permission does not change before or after the state migration (showing its not affected by it). But I think we need it there due to how the tests need to read the policies from the resource.

@ghost ghost added size/M and removed size/L labels Mar 20, 2019
@Lucretius
Copy link
Contributor Author

@tombuildsstuff I've gone and swapped the migration test to be the bare minimum of expecting 0 storage permissions for each migration test so that the terraform diff works. I don't think we can remove it entirely as per my comment above.

@ghost ghost removed the waiting-response label Mar 22, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @Lucretius, LGTM 👍

@katbyte katbyte merged commit b998047 into hashicorp:master Mar 27, 2019
katbyte added a commit that referenced this pull request Mar 27, 2019
@ghost
Copy link

ghost commented Apr 3, 2019

This has been released in version 1.24.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
	version = "~> 1.24.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 27, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support KeyVault storage permissions
3 participants