Closed Tensho closed 3 years ago
Does it make sense?
Makes sense, yes, will try to implement in further versions
@VladRassokhin Is it still on the roadmap? π
This is not more relevant. Here is a comment from HashiCorp representative:
For the real reasoning, I think it has to do with whether or not the token represents a configuration language keyword or expression, which in this case it doesnβt since it is intended as a label (and can potentially have characters outside that of an expression). I believe the allowance of non-quotes there was incidental more than intentional and the quotes being idiomatic is there for the consistency of those labels which might require the quotes. In the future, the SDK may support block syntax like this:
resource "example_thing" "example" { some_block "label1" { # nested attributes } some_block "label2" { # nested attributes } }
Which will likely have the quoting requirement for "label1" and "label2" for similar reasons.
and further MR making formatter not happy with unquoted labels.
@VladRassokhin Thank you for the patience π
@Tensho Thank you for investigation and follow-up!
Feature Request
Terraform 0.12+ allows to omit redundant quotes around resource type and name. Please could you make it configurable in "Editor β> Code Style β> Terraform Config"?
Terraform Configuration Example