The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Add `--autoplan-file-list` server flag to allow modifying the list of files that trigger planning.
* Set default value for `--autoplan-file-list` and add `terragrunt.hcl` to the list.
* Default is handled in server now. No need for it here.
* Fix syntax error test.
* Fix e2e tests
This is two changes:
Replacing all usages of SimpleLogger with it's interface SimpleLogging which makes it easier to swap out loggers going forward
Nukes SimpleLogger in favor of StructuredLogger which allows us to better analyze logs in our log management system we choose.
I ran into an issue where I have a directory of templates I use that I
name `foo.tf.template`. I found that Atlantis was running against this
directory and failing, which was unexpected behaviour.
This is because we're just checking if `.tf` is contained within a
filename, rather than checking if it's the suffix of the filename.
Instead, we can use regex to ensure that we're only filtering on actual
Terraform files, inclusive of `.tf` and `.tfvars` suffixes.
There are obviously some alternative ways I could get around this:
rename my templates to `foo.template` without the `.tf`.
I also really liked the idea of a `.atlantisignore` file previously
cited[1], but it was rejected in favour of explicitly defining exactly
which directories to run it in. We have a large number of directories so
this wasn't appealing to me.
I felt this behaviour was sufficiently unexpected that it was worth
making a more explicit filter.
[1] https://github.com/runatlantis/atlantis/issues/26
Add Apache 2 license and Hootsuite copyright to all golang
files. Add a disclaimer that the files have been modified
hereafter by contributors to this repo in order to abide
by the Apache 2 license requirements.
Fixes#12. Previously we would assume that if there was a change
in any modules/ directory, we should run plan in the parent. Now
we first check whether the parent has a main.tf file. If it doesn't
then we assume it's not actually the root of a project.