Open pavel-khritonenko opened 1 year ago
Hello, pavel-khritonenko! š
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.
Just few cents - in my case I found an workaround - I saved a file locally with hash in name too so it forced resource been destroyed and created.
Community Guidelines
Terraform
v1.3.3
Terraform Provider
v2.1.1
VMware vSphere
v7.0.3
Description
I generate a value of argument
vsphere_file.destination_file
based on the content of file I'm going to upload (md5-hash, actually), so when the content of the file has changed the new filename generated. And in that case subsequentterraform apply
fails with "file not found".According to the code,
id
of that resource calculated only once on file upload, based ondestination_file
argument and not going to be changed despitedestination_file
changed.Would recommend to change that id (not sure if it's possible and for me it ever sounds weird), or force new resource if that field has changed.
Affected Resources or Data Sources
resource/vsphere_file
Terraform Configuration
Debug Output
Not sure if it'd help
Panic Output
No response
Expected Behavior
Would expect file name and content changed in the remote datastore
Actual Behavior
On a subsequent apply, when file's hash changed:
Steps to Reproduce
Apply terraform configuration, change the content of the file, apply terraform configuration
Environment Details
No response
Screenshots
No response
References
No response