Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

File upload to datastore changes "+" symbol in the file name to a space. #1928

Closed
4 tasks done
Chad-Saltzman opened this issue Jun 13, 2023 · 3 comments · Fixed by #2217
Closed
4 tasks done

File upload to datastore changes "+" symbol in the file name to a space. #1928

Chad-Saltzman opened this issue Jun 13, 2023 · 3 comments · Fixed by #2217
Assignees
Labels
bug Type: Bug
Milestone

Comments

@Chad-Saltzman
Copy link

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

0.14.11

Terraform Provider

2.4.0

VMware vSphere

7.0.3

Description

When uploading a file to a datastore in vsphere, the filename removes the "+" symbol and replaces it with a space. The file successfully uploads in the datastore, but the terraform apply fails and throws a provider error due to the name being different than the expected.

Affected Resources or Data Sources

resource/vsphere_file

Terraform Configuration

resource "vsphere_file" "iso_media" {
  datacenter         = var.datacenter
  datastore          = var.datastore
  source_file        = "./dependencies-1.0.0+1.iso"
  destination_file   = "ISO/dependencies-1.0.0+1.iso"
  create_directories = true
}

Debug Output

https://gist.github.com/Chad-Saltzman/5acd555c790f869a1b305c53d381f84b

Panic Output

No response

Expected Behavior

File is uploaded to the vSphere datastore with the correct name and a successful terraform apply.

Actual Behavior

File is uploaded to the vSphere datastore with the "+" symbol replaced by a space and the terraform apply fails.

Steps to Reproduce

Use the vsphere_file resource to upload a file with a destination name containing a "+" symbol.

Environment Details

No response

Screenshots

Terraform Apply
vSphere File Upload
Error Message

References

No response

@Chad-Saltzman Chad-Saltzman added bug Type: Bug needs-triage Status: Issue Needs Triage labels Jun 13, 2023
@github-actions
Copy link

Hello, Chad-Saltzman! 🖐

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 tenthirtyam added this to the Backlog milestone Aug 7, 2023
tenthirtyam added a commit that referenced this issue Jun 14, 2024
Updates `r/file` to ensure that incoming file names with special characters (+, specifically) retain their original name when uploaded so that the plan is consistent.

Ref: #1928

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam modified the milestones: Backlog, v2.8.2 Jun 14, 2024
@tenthirtyam tenthirtyam removed the needs-triage Status: Issue Needs Triage label Jun 14, 2024
@tenthirtyam tenthirtyam self-assigned this Jun 14, 2024
tenthirtyam added a commit that referenced this issue Jun 15, 2024
Updates `r/file` to ensure that incoming file names with special characters (+, specifically) retain their original name when uploaded so that the plan is consistent.

Ref: #1928

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
tenthirtyam added a commit that referenced this issue Jun 15, 2024
Updates `r/file` to ensure that incoming file names with special characters (+, specifically) retain their original name when uploaded so that the plan is consistent.

Ref: #1928

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
Copy link

This functionality has been released in v2.8.2 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

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 Jul 30, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants