Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

terraform fmt question #191

Open
tombuildsstuff opened this issue Mar 29, 2017 · 2 comments
Open

terraform fmt question #191

tombuildsstuff opened this issue Mar 29, 2017 · 2 comments
Labels
formatter v1 Relates to the v1 line of releases

Comments

@tombuildsstuff
Copy link

An issue's been opened on the Terraform repository regarding the terraform fmt command, which after some tracing through comes into this repository.

HCL Template

# Global Variables
variable "account_number" {}
variable "active_region" {}
variable "aws_region" {}
variable "env_name" {}

Expected behavior

What should have happened?

terraform fmt should be happy with this code block.

Actual behavior

What actually happened?

terraform fmt resulted in the following:

# Overall
variable "account_number" {}

variable "active_region" {}
variable "aws_region" {}
variable "env_name" {}

Steps to reproduce

  1. Add a single-line comment to the top of a block of similar variables
  2. terraform fmt

References

Are there any other GitHub issues (open or closed) that should
be linked here? For example:

@sethvargo
Copy link
Contributor

@grubernaut you've been in this before. Any insight?

@jaygorrell
Copy link

For what it's worth, I hit this after updating from TF 0.8.7 to TF 0.9.2. I'm not sure how that relates to this repo but it seems to have been something changed in that range.

@apparentlymart apparentlymart added the v1 Relates to the v1 line of releases label Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter v1 Relates to the v1 line of releases
Projects
None yet
Development

No branches or pull requests

4 participants