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

Can't destroy r/vsphere_virtual_machine due to changed disk options #1873

Closed
1 of 4 tasks
defo89 opened this issue Mar 28, 2023 · 3 comments
Closed
1 of 4 tasks

Can't destroy r/vsphere_virtual_machine due to changed disk options #1873

defo89 opened this issue Mar 28, 2023 · 3 comments
Labels
bug Type: Bug

Comments

@defo89
Copy link

defo89 commented Mar 28, 2023

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

1.4.2

Terraform Provider

v1.26.0

VMware vSphere

v7.0.3

Description

We would like to change disk configuration on VMs: decrease disk size and switch from thin to thick.
Terraform destroy perform plan first which errors for both cases.

https://github.com/hashicorp/terraform-provider-vsphere/blob/main/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go#L1461-L1476

Since our intention is not to change the resource but rather to destroy+deploy new one, is there any solution to perform this?

Affected Resources or Data Sources

resource/vsphere_virtual_machine

Terraform Configuration

resource "vsphere_virtual_machine" "vm" {
--snip--

  disk {
    label            = "disk0"
    size             = "64"
    unit_number      = "0"
    eagerly_scrub    = false
    thin_provisioned = true
  }
}

Change is size and thin_provisioned = false

Debug Output

Error: disk.0: virtual disk "disk0": cannot change the value of "thin_provisioned" - (old: true new: false)

Error: disk.0: virtual disk "disk0": virtual disks cannot be shrunk (old: 64 new: 60)

Panic Output

No response

Expected Behavior

Destroy works

Actual Behavior

Destroy fails

Steps to Reproduce

terraform destroy -target vsphere_virtual_machine.vm

Environment Details

No response

Screenshots

No response

References

No response

@defo89 defo89 added bug Type: Bug needs-triage Status: Issue Needs Triage labels Mar 28, 2023
@github-actions
Copy link

Hello, defo89! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@tenthirtyam
Copy link
Collaborator

Please refer to existing issues:

@tenthirtyam tenthirtyam reopened this Mar 28, 2023
@tenthirtyam tenthirtyam closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2023
@tenthirtyam tenthirtyam removed the needs-triage Status: Issue Needs Triage label Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants