-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ability to ignore terraform files and folders from atlantis run #26
Comments
Comment by @swladyka I like the option with .atlantisignore files very much, would be very helpful when working with terraform modules and having templates in a separate directory. |
Comment by @anubhavmishra yea for sure. Currently, atlantis ignores certain folders ex: |
Comment by @johntdyer So it seems like the fix in this ticket aws to rename your module folder to "_modules" or "modules" which would ignore them. However it looks like hootsuite/atlantis#211 changed this behavior.... Any chance you guys could re-evaluate the .atlantisignore suggestion ? |
Comment by @lkysow @johntdyer is the issue you're having that Atlantis is running Does that change fix your issue or is there something else happening? Regarding .atlantisignore, here's the direction I want to go:
version: 2
pipelines:
plan:
on_push:
enabled: true
when_modified: ["*.tf", "../../modules/**/*.tf"] # If a modified file matches then we'll run plan in this project. Uses .gitignore syntax. It's optional, if not specified then will default to ["*.tf", "**/*.tfvars"]. So long-story short, you could use the |
Comment by @johntdyer Thanks for the update. So, yes this would work. Thanks for the update. Any idea on when we can expect this new behavior ? |
Comment by @lkysow The new behaviour is being worked on right now but I can't give you an accurate ETA. There's a lot of features being considered for the next release: https://docs.google.com/document/d/13if7Bma_uTF1nhvdKx-vpU5ASakmPt-EfPSo3epv7JQ/edit# Can you elaborate on why having the ability to run |
Comment by @johntdyer Right now when I run Ran Plan in 2 directories:
_/Plan Error
sns_to_spark_lambda/Plan Error
|
Comment by @lkysow Ahh sorry, you need to pull the latest release from here: https://github.com/runatlantis/atlantis |
Closed by #152. In version 0.4 now. Where Atlantis automatically runs plan can be configured via an |
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] runatlantis#26
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] runatlantis#26
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] #26
* [ORCA-393] Add basic stats. * Fmt.
Hello @lkysow - i still think that feature would be nice to have - it would patch following security gap Let's imagine a following situation Team has decided that they will be using separate repositories with common terragrunt structure
from particular reasons they cannot oneshot apply changes on version: 3
projects:
- dir: test/vpc
- dir: test/rds even if |
* [ORCA-393] Add basic stats. * Fmt.
Issue by @anubhavmishra
Monday Jun 26, 2017 at 06:05 GMT
Migrated from hootsuite/atlantis#50
Why was it migrated?
Currently, atlantis ignores certain folders such as
_modules/
andmodules/
but we want to extend this to ignore any folder that has.atlantisignore
file or something along those lines. https://github.com/hootsuite/atlantis/blob/master/server/plan_executor.go#L196The text was updated successfully, but these errors were encountered: