-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource: 'azurerm_storage_account_encryption_settings' to enable storage account encryption using key vault customer-managed keys #2046
Conversation
* Add key_vault_properties optional parameter to storage account. * Add test for storage account with custom key for SSE. * Update docs.
In order to get this PR working I need the KeyVault to have https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/vaults_createorupdate Looks like the KeyVault provider needs to be updated. Have you noticed that? |
added request to support enablePurgeProtection and enableSoftDelete in KV #2066 |
@LaurentLesle good catch, enablePurgeProtection and enableSoftDelete properties do need to be set on the key vault. A request to set storage account keyvault properties returns OK, which is why everything looked good. The test case needs to be updated when the enablePurgeProtection and enableSoftDelete properties are added (PR #1805) to the keyvault resource and this PR should be good to review again. |
Out-of-curiosity ; Won't this go into a cycle/loop? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liemnotliam Thanks for the contributions and I added some comments.
@liemnotliam Thanks for this PR, if you don't mind I would like to build on top of what you did here in your fork to get this merged. I am currently splitting this resource into two resources since there are multiple steps that need to be done (e.g. create the service account, created a key vault policy on the key vault for the newly created service account, then update the service account with the correct encryption settings). |
@jeffreyCline heads up this is dependent on Key Vault Soft Delete (#1805) which requires some thought / will be a breaking change |
@jeffreyCline thanks for pushing the commits. I notice that the Travis CI failed due to lint error:
Can we get it fixed so that we move forward ? |
@metacpp I am removing your review since it is outdated. |
Is there an ETA on when this feature will be implemented? I would very much like to have this functionality in the provider, at the moment I'm having to work around it by following the Terraform run with a Powershell script to add the encryption settings. |
This is very much needed. I don't see the point of having the option to choose the |
Wouldn't it be nice to just pass the key URI that already includes the full path to the keyVault, keyName and keyVersion? |
I am porting this to the new code base for 2.0 release. |
This has been released in version 2.0.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 = "~> 2.0.0"
}
# ... other configuration ... |
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! |
This PR adds storage account key vault properties to enable support for customer-managed keys for storage service encryption.
Issue #658
Test results: