Closed jasonwalsh closed 4 years ago
Thanks for reviewing @apparentlymart!
I authored a new commit (e2f307e) which includes the documentation from https://github.com/apparentlymart/terraform-clean-syntax/pull/14#discussion_r459113824.
Hi @jasonwalsh,
I'm sorry for the delay in following up with you on this PR. I got distracted by some other work elsewhere. :confounded:
I'm going to merge this now. Thanks!
I'm actually about to archive this repository because I upstreamed the functionality from it into Terraform itself for the Terraform 0.14 release (see hashicorp/terraform#26390. Because I did that upstreaming before I merged your PR here, what I upstreamed unfortunately didn't include this new capability.
If you were interested in submitting it upstream I think it shouldn't require too much further work since what I submitted upstream was structured very similarly to terraform-clean-syntax
... I think the main additional thing would be that upstream Terraform requires unit test coverage, whereas I didn't include any automated tests in terraform-clean-syntax
. However, I think a unit test for the change you proposed here would just entail a couple new files in Terraform's command/testdata/fmt
directory to reflect the before and after cases that this rule is aiming to implement.
Thanks again!
This pull request adds support for removing quoted references for
provider
meta-arguments.For example, given the following Terraform configuration:
Invoking
terraform-clean-syntax
rewrites the file like so:Where quotes are removed from the
provider = null.foo
andprovider = aws.prod
meta-arguments.Fixes #13