-
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
Disk Encryption Set Module does not work correctly #20995
Comments
Follow exactly what the doc shows so not sure why it is giving me errors. |
Can you try this?
Adding WrapKey and UnwrapKey fixed the access issue for me. |
Thanks @meizenga, i also had to add Verify permission as well for the VM i was deploying. Can you make changes to the module doc that adds wrapkey, unwrap key and verify to those key permissions? |
@cshea15 you can add the Label Documentation to this issue. Hopefully someone picks it up. btw. I used v3.48 and I didn't require the Verify permission. |
This seems to be caused by https://github.com/hashicorp/terraform-provider-azurerm/pull/19113/files#diff-a0ea8d81165c29e329a938b613536ff9cd587c0130c040c927ff7094c984c0f3R590-R595 which requires the new permission from the client. It is not possible to update a previously created |
There was a discussion about the breaking the existing resources in #19113 (comment) |
@myc2h6o I was able to get it to work when I added the GetRotationPolicy and Veriy policy. |
That would introduce a regression, since we then wouldn't be tracking this field, which would be misleading to users - instead this can be fixed by adding the relevant permission as @cshea15 has done. In retrospect this permission probably wanted documenting under the upgrade notes for this version of the Provider - however unfortunately the release notes are immutable so that's not something we can change at this time. However since it appears that the issue has been resolved by adding the new permission, I'm going to close this for the moment. Thanks! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.4.0
AzureRM Provider Version
3.47.0
Affected Resource(s)/Data Source(s)
azurerm_disk_encryption_set
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
should deploy out key vault, key vault key, key vault policy, disk encryption set.
Actual Behaviour
│ Error: current client lacks permissions to read Key Rotation Policy for Key "kv-key-chashea-eastus-dev" ("Vault: (Name "kv-chashea-dev" / Resource Group "rg-kv-eastus-dev")", Vault url: "https://kv-chashea-dev.vault.azure.net/"), please update this as described here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_key#example-usage : keyvault.BaseClient#GetKeyRotationPolicy: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="Forbidden" Message="The user, group or application 'appid=04b07795-8ddb-461a-bbee-02f9e1bf7b46;oid=b6ea9d10-396e-4760-80f4-4336b0b1a990;numgroups=1;iss=https://sts.windows.net/5c5e1a56-251f-44b1-8f67-c97243f9e7cb/' does not have keys getrotationpolicy permission on key vault 'kv-chashea-dev;location=eastus'. For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287" InnerError={"code":"ForbiddenByPolicy"}
│
│ with module.dse.azurerm_key_vault_key.kv_key,
│ on Modules\dse\kv.tf line 31, in resource "azurerm_key_vault_key" "kv_key":
│ 31: resource "azurerm_key_vault_key" "kv_key" {
│
Steps to Reproduce
terraform init
terraform plan
Important Factoids
No response
References
following this doc here. https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/disk_encryption_set
The text was updated successfully, but these errors were encountered: