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 still doesn't format here-docs properly (V0.8.4) #11208

Closed
nateww opened this issue Jan 14, 2017 · 3 comments · Fixed by #11396
Closed

terraform fmt still doesn't format here-docs properly (V0.8.4) #11208

nateww opened this issue Jan 14, 2017 · 3 comments · Fixed by #11396
Assignees

Comments

@nateww
Copy link

nateww commented Jan 14, 2017

'terraform fmt' still doesn't quite get formatting right with here docs, even in terraform 0.8.4.

resource "aws_instance" "coreos" {
...
  connection {
    user = "core"
  }

  provisioner "remote-exec" {
    inline = [<<EOF
      mv /tmp/example /tmp/example.other
      mv /tmp/other /tmp/other.other
    EOF
    ]
  }

Will get formatted to:

  provisioner "remote-exec" {
    inline = [<<EOF
      mv /tmp/example /tmp/example.other
      mv /tmp/other /tmp/other.other
    EOF]
  }

Note the trailing EOF.

This is much better than in previous versions of terraform, but it's not all the way there yet.

@mitchellh
Copy link
Contributor

Thanks! Fixed. :) Will be in 0.8.5. Keep 'em coming!

@nateww
Copy link
Author

nateww commented Jan 25, 2017

Thanks again!

@ghost
Copy link

ghost commented Apr 17, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants