-
Notifications
You must be signed in to change notification settings - Fork 100
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
with terragrunt-alantis-config, do i still need to commit the alantis.yaml to github ? #86
Comments
the plan for this is atlantis is adding a feature to allow for pre-workflow custom hooks |
for now would recommend committing the atlantis.yaml until that is merged |
I'm looking at "terragrunt-atlantis-config using github action to validate atlantis.yaml" . I'm not sure it's a way to achieve what i need. @michaelfarrell76 |
@IamGabrielWu You can follow the method described in this medium post till the PR of having pre-workflow custom hooks is merged. I would advise against committing as you will have each user run the current project |
I'm going to close this, but feel free to open if you have any other questions. To summarize:
|
runatlantis/atlantis#1255 has been released in Atlantis v0.16.0, allowing us to run terragrunt-atlantis-config on the Atlantis server side of things. I'll be updating the documentation of this repo soon with how to use the new features 😄 |
@angeloskaltsikis the post wasn't entirely clear on how to setup the post-clone git hook, I ended up putting the core.hooksPath in /etc/gitconfig with /home/atlantis/hooks as the path. Though I am using the new pre-workflow feature of atlantis it doesn't consistently run for subsequent workspaces, making my atlantis.yaml not clone into each workspace directory. I am using both methods now and things appear stable, would love to keep the conversation going and see what you come up with @dmattia. My use case is for multi account and by passing in account name I'm able to generate the config just for the instance of atlantis set for the account. This line is in my root terragrunt.hcl (hopefully it helps someone else): locals {
atlantis_skip = get_env("ATLANTIS_ENABLED_ACCOUNTS", "") == local.account_name ? false : true
} It does mean that bad configs will break everything and that there is no way to ignore a directory (per the way I am parsing the environment variable, suggestions welcome!). |
Many thanks @tsunamishaun for sharing the above code snippet. It has just solved the first impediment I was facing with this fantastic tool to generate the locals {
(...)
atlantis_skip = contains(["dev"], local.aws_account_workload) ? false : true
} At the moment, we only let Atlantis run in our AWS development account so we can take careful decisions about moving code into other more sensitive environments by leveraging a dedicated GitLab runner. I even think it should be clearly indicated in the README.md of this project given the fact it also works despite utilising the CLI flag How to limit the automatic generation of an account
└ _global
└ region
└ _global
└ environment
└ resource |
I don't know how to make the atlantis.yaml automatically generated every time i create a pull request, and atlantis can pick up this auto generated file then do terragrunt plan or apply.
I think this would be best if atlantis.yaml can be auto generated and i don't need to keep track of this file in github repo.
The text was updated successfully, but these errors were encountered: