-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Azure Disk Encryption with VM Extensions vs. Using Managed Disks #5102
Comments
@tombuildsstuff : Any idea why the |
By the definition of go sdk, the encryption setting enable of managed disks should be updatable (code). But I found a comment in the terraform code here:
Therefore I suppose that this |
Hi @ArcturusZhang, lifecycle {
ignore_changes = [encryption_settings]
} Thx! 👍 |
hey @stefan-rapp Glad to hear this is now working for you - since this is working as intended (as Terraform should detect these changes not present in the config) - I'm going to close this issue 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. 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! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_managed_disk
azurerm_virtual_machine_extension
Terraform Configuration Files
I created several VMs with managed (data) disks a few month ago according to the following resource :
I configured all VMs already (Software, Services, etc) and now the customer has the requirement to encrypt the disks using BitLocker. So I created the following resource to encrypt 'All' disk of a VM, and it worked fine so far:
Debug Output
Panic Output
Expected Behavior
The disks are encrypted and a re-run of
terraform plan
orterraform apply
does NOT cause any changes.Actual Behavior
I have now a bigger issue regrading the encryption of managed Disks. When I re-run terraform using
terraform plan
orterraform apply
, it wants to replace all my data disks I have already created, like the following screenshot illustrates.I know that the problem is the
encryption_settings
section of the managed disk setting, but I do not know how to solve it. And my already created disks should not be replaces.Does anyone has an idea? Appreciate it!
The text was updated successfully, but these errors were encountered: