Description
Check for previous/existing GitHub issues
- I have checked for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.18.0
(Optional) Correlation Id
No response
Description
Hey, I've been seeing some issues with multiple AVMs showing unexpected errors for a subset of properties when using IntelliJ IDEA as my IDE. there are several of those in the VM module, and it looks like that's an issue with trailing whitespace in heredoc strings.
This issue from the resource group AVM describes the same underlying issue:
Azure/terraform-azurerm-avm-res-resources-resourcegroup#62
If the delimiter has a trailing space following the close IntelliJ doesn't treat it as a valid closure. As a result it treats subsequent code as part of the heredoc string and throws errors as a result. Removing the trailing space following delimiter clears that up.
This issue talks about a broadly similar challenge:
hashicorp/terraform#25410
This doc covers heredoc strings in TF:
https://developer.hashicorp.com/terraform/language/expressions/strings#heredoc-strings
While it isn't entirely clear from the doc, this bit makes me think a trailing space could be an issue:
"Terraform then processes the following lines until it finds one that consists entirely of the identifier given in the introducer."
I'll submit a PR to try to address this.
Activity