#atlantis - April 2019

atlantisArchived
27 messages

Discuss the Atlantis (runatlantis.io)
Archive: https://archive.sweetops.com/atlantis/

rohit
rohitover 7 years ago
what is the best way to setup atlantis in AWS ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
this is actually a surprisingly big question.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
we've deployed atlantis now many times in many different configurations
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
our current best practice is to deploy it as an ECS fargate task with an ALB configured with OIDC
aaratn
aaratnover 7 years ago
@Erik Osterman (Cloud Posse) - Any hints how we can do this with terragrunt + atlantis ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
to use terragrunt you just need to define your own workflow in the atlantis.yaml
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
don't depend on the built-in plan and apply steps of atlantis
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
we define a make workflow that you can borrow
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
then you just define the steps in your Makefile for the project
aaratn
aaratnover 7 years ago
Got it ! We used to use a lot of makefiles before terragrunt but I got what you are saying. Use makefiles + terragrunt on atlantis
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago

workflows:
  make:
    plan:
      steps:
        - run: "make reset deps"
        - run: "set -o pipefail; make plan | tfmask | scenery --no-color"
    apply:
      steps:
        - run: "set -o pipefail; make apply | tfmask"
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so a project just defines a Makefile with a plan and apply target
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
our Makefile looks like this
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
so we don't need a wrapper like terragrunt
aaratn
aaratnover 7 years ago
Interesting !
aaratn
aaratnover 7 years ago
Any clues to do a dry run before apply ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
you mean terraform plan?
aaratn
aaratnover 7 years ago
the terraform plan doesn't necessarily succeed
aaratn
aaratnover 7 years ago
Like for eg. you define a wrong instance type in terraform plan and it will succeed but it will fail when you actually apply it
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@antonbabenko manages terraform-aws-modules/atlantis
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
it uses the #terraform-aws-modules which we (cloudposse) do not manage
antonbabenko
antonbabenkoover 7 years ago
Yeah, I am not very active in #terraform-aws-modules neither, but you can try to ask in public github. Maybe other can help you faster there.