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

Ephemeral OS disk examples use ReadWrite caching #25275

Open
1 task done
nathanweeks opened this issue Mar 16, 2024 · 0 comments
Open
1 task done

Ephemeral OS disk examples use ReadWrite caching #25275

nathanweeks opened this issue Mar 16, 2024 · 0 comments

Comments

@nathanweeks
Copy link

nathanweeks commented Mar 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.6.4

AzureRM Provider Version

3.96.0

Affected Resource(s)/Data Source(s)

azurerm_linux_virtual_machine, azurerm_windows_virtual_machine, azurerm_linux_virtual_machine_scale_set, azurerm_windows_virtual_machine_scale_set

Terraform Configuration Files

https://github.com/hashicorp/terraform-provider-azurerm/tree/7f80c0bb23fe7835ded5e88c3217bdaef071a615/examples/virtual-machines/linux/ephemeral-os-disk

Debug Output/Panic Output

Error: expanding `os_disk`: `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`
           with azurerm_linux_virtual_machine.main,
           on main.tf line 39, in resource "azurerm_linux_virtual_machine" "main":
           resource "azurerm_linux_virtual_machine" "main" {

Expected Behaviour

The ephemeral OS disk examples use ReadWrite caching, which is not allowed when diff_disk_settings is used to enable ephemeral OS disk:

The examples should be updated to use ReadOnly caching.

Actual Behaviour

No response

Steps to Reproduce

terraform apply -auto-approve -var location=eastus -var prefix=test

Important Factoids

No response

References

-> **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants