VM annotation as heredoc triggers resource update across applies when unmodified #2252
Open
4 tasks done
Labels
Milestone
Community Guidelines
Terraform
1.9.5
Terraform Provider
hashicorp/vsphere 2.8.3
VMware vSphere
7.0.3 build 22357613
Description
When a multi-line virtual machine annotation is specified using a heredoc (using
<<-EOT
) it is correctly saved through vSphere provider, but subsequent applies of the same unmodified annotation shows changes are detected. The changes detected are apparently phantom, showing per-line changes from -value to +value in plan/apply output with the line content shown is clearly unmodified.When the multi-line annotation is specified as a single string with inline C-style escaped line-endings (e.g.: "my multi-line\nawesome\n\nannotation"), the problem does not exist. The multi-line annotation is saved and appears as intended, and subsequent plan/apply invocations detect no changes.
Affected Resources or Data Sources
Terraform Configuration
Example annotation demonstrating issue, lines are TAB-prefixed:
Example annotation that avoids issue:
annotation = "my multi-line\nawesome\n\nannotation"
Debug Output
https://gist.github.com/arcticgeek/9c14ec830118c2a2aabb2714dcd693e9
Panic Output
No response
Expected Behavior
Multi-line VM annotations specified as heredocs should trigger no changes when unmodified across plan/apply invocations.
Actual Behavior
Phantom changes to the multi-line annotation are detected even when unmodified.
Steps to Reproduce
apply multi-line annotation to VM resource as heredoc with
<<-EOT
terraform plan|apply
Environment Details
Windows AMD64 with terraform source code in UTF8 and having CRLF line endings.
Screenshots
No response
References
#713
The text was updated successfully, but these errors were encountered: