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

Add support for terragrunt-friendly project structures #523

Closed
antonbabenko opened this issue Feb 9, 2018 · 1 comment
Closed

Add support for terragrunt-friendly project structures #523

antonbabenko opened this issue Feb 9, 2018 · 1 comment

Comments

@antonbabenko
Copy link

antonbabenko commented Feb 9, 2018

@lkysow Please tell me if it is a good idea to open such issue here or in another place (https://github.com/atlantisnorth/atlantis-tests is probably a better place, but it does not have "Issues" enabled, bug?)

The project structure I typically work with look like this:

.
│   atlantis.yml     <- just this configuration file is required. All projects should be listed there.
├── project1-dev
│   ├── common.tfvars
│   ├── global
│   │   ├── iam-account
│   │   │   └── terraform.tfvars
│   │   ├── iam-assumable-roles
│   │   │   └── terraform.tfvars
│   │   └── regional.tfvars
│   ├── iam_role.txt
│   └── terraform.tfvars
├── project2-prod
│   ├── common.tfvars
│   ├── eu-west-1
│   │   ├── alb-public
│   │   │   └── terraform.tfvars
│   │   ├── application
│   │   │   └── terraform.tfvars
│   │   ├── rds
│   │   │   └── terraform.tfvars
│   │   ├── regional.tfvars
│   │   ├── vpc
│   │       └── terraform.tfvars
│   ├── iam_role.txt
│   └── terraform.tfvars

Using terragrunt I can run terragrunt apply from such locations:

  • project1-dev/{region}/{module}/

and run terragrunt apply-all from:

  • project1-dev/{region}/

Ideally, I want to be able to call Atlantis like these:

  • atlantis plan, atlantis apply, atlantis plan-all, atlantis apply-all - to process directories which were changed by this PR (exactly as running terragrunt COMMAND, eg terragrunt apply-all, terragrunt plan from the directories)
  • atlantis plan PROJECT (for example, atlantis plan project2-prod/eu-west-1/rds should do cd project2/eu-west-1/rds && terragrunt plan

Let me know what do you think?

@lkysow
Copy link
Collaborator

lkysow commented Feb 11, 2018

Thanks for that, I've opened up the ability to add issues to https://github.com/atlantisnorth/atlantis-tests however this repo is used for the end-to-end tests so I'd prefer to keep track of this request in the main repo: https://github.com/atlantisnorth/atlantis where the changes would have to be made.

I've referenced this issue in this ticket: runatlantis/atlantis#4 because it gives even greater detail and is kind of an extension of what's being asked for there.

I think what I'll end up doing is making it possible to add custom commands to Atlantis like atlantis plan-all rather than trying to support this natively in Atlantis.

I'm closing this for now but please if you have a response add it to that ticket. Also thank you for bringing up terragrunt. I haven't looked at it for a while and I can see how useful a tool it is. I definitely want to be able to support Terragrunt users in Atlantis.

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