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

Guidelines for multi-environment setup? #280

Open
samlaf opened this issue Jun 1, 2023 · 2 comments
Open

Guidelines for multi-environment setup? #280

samlaf opened this issue Jun 1, 2023 · 2 comments

Comments

@samlaf
Copy link

samlaf commented Jun 1, 2023

Cross-posting from atlantis repo.

It would still be very useful for newcomers to have guidelines or even an example repo with suggestions on how to deal with different envs. We are using terragrunt with https://github.com/transcend-io/terragrunt-atlantis-config, but nothing anywhere, either in their docs or atlantis' docs, mentions environments and how to deal with them.

If our setup is a directory with

  • dev
    • terragrunt files
  • pre-prod
    • terragrunt files
  • prod
    • terragrunt files

and currently use terragrunt-atlantis-config generate --filter dev --output atlantis.yaml --autoplan --parallel --create-workspace to generate shared plans for our dev environment. We're just unsure how to extend this to to multi-envs properly. Just adding --filter {dev,pre-prod} seems like it could work, but is this the right way to do things? Or should I be using one project per env? Or..?

@moritz31
Copy link

moritz31 commented Jun 6, 2023

Hey @samlaf we are currently at the same issue. We have a multi environment repository and multiple atlantis instances and want to generate config for the different use cases.
For our test environment this is very simple with the command you mentioned above, but for our other environments it seems not possible because of the bad globbing support in go. This is also mentioned in #248

What we would need is that we could pass a list of folders into the --filter property or make glob work better.

@samlaf
Copy link
Author

samlaf commented Jun 6, 2023

We only have 3 envs so I just ran the command 3 times with different filters for each env (there’s a flag to append the generated projects to the generated atlantis.yaml instead of overwriting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants