Help us test .terraformignore (Terraform Ignore)

We’re looking for a little help testing this upcoming feature.

Terraform Ignore is a work in progress, and may have issues.

You can use this build of Terraform via this feature branch: https://github.com/hashicorp/terraform/tree/f-tfignore.

A plan or apply with this build will be very noisy at present, as it shares all the files that are ignored, but that’s in there currently to help with debugging while this is in progress.

How to test:

Checkout and build Terraform from the f-tfignore branch (i.e. run “go install”).

To use/test this feature:

  • Have a Terraform setup that leverages the remote backend
  • Add a .terraformignore file to your configuration root
  • Run terraform plan or terraform apply and see which files are excluded/you can add patterns to the .terraformignore file to exclude files/directories from your slug

About the .terraformignore file:

  • Blank lines or lines starting with # are ignored.
  • Each line defines a pattern
  • You can end patterns with a forward slash / to specify a directory.
  • You can negate a pattern by starting it with an exclamation point !.
  • Standard glob patterns work.

If you’d like to report an issue and/or provide some additional feedback we’ve got a form here for this feature: https://forms.gle/czsWEYqag8drdwDj6 .

Notes:
If building Terraform from source is new-to-you (it is to me), you’ll want to:

  • Download Go 1.12.x (https://golang.org/dl/) and set it up (Add go to your PATH)
  • Use go install to build the terraform binary