#atlantis - September 2020

atlantisArchived
30 messages

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

September 2020
RB
RBabout 6 years ago
if anyone uses the terraform-aws-atlantis module to launch atlantis in fargate, does anyone have interest in turning atlantis into a github bot instead of a github user?

i wrote up this pr and hoping to get more reviews / upvotes if possible 🙂

https://github.com/terraform-aws-modules/terraform-aws-atlantis/pull/151
Callum Robertson
Callum Robertsonabout 6 years ago
Atlantis people
Callum Robertson
Callum Robertsonabout 6 years ago(edited)
I seek a guru among you. I have a few questions... First is there a way with - env in a custom workflow to ingest ENVIRONMENT VARIABLES form the container into the run command? I'm having issues with this not work.

https://www.runatlantis.io/docs/custom-workflows.html#reference

I saw the below in their documentation, is it possible to extend this environment variables? Am I doing something wrong with the workflow below?

Notes
• _run steps are executed with the following environment variables:_
• ...
Callum Robertson
Callum Robertsonabout 6 years ago
  test_workflow:
    plan:
      steps:
        - run: rm -rf .terragrunt*
        - run: helm version
        - env:
            name: CHARTMUSEUM_PASSWORD
            value: ${CHARTMUSEUM_PASSWORD}
        - run: helm repo add %REPONAME% %REPOURL% --username user --password $CHARTMUSEUM_PASSWORD
        - env:
            name: TERRAGRUNT_TFPATH
            command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
        - run: terragrunt plan-all -no-color --terragrunt-parallelism 4 | grep -v 'terragrunt'
Callum Robertson
Callum Robertsonabout 6 years ago
Secondly, how is the experience with Terragrunt & Atlantis?
joshmyers
joshmyersabout 6 years ago
You can use env vars with Atlantis ayte
Callum Robertson
Callum Robertsonabout 6 years ago
I'm finding the $PLANFILE to not work well when autoplan is running a plan-all against multiple dirs
joshmyers
joshmyersabout 6 years ago
Experience with Terragrunt + Atlantis is working well for us.
Callum Robertson
Callum Robertsonabout 6 years ago
Am I doing something wrong above @joshmyers
joshmyers
joshmyersabout 6 years ago
@Callum Robertson Nope, that workflow is broken, don’t use $ACTION-all commands. They aren’t safe IMO
Callum Robertson
Callum Robertsonabout 6 years ago
the - run: helm repo add %REPONAME% %REPOURL% --username user --password $CHARTMUSEUM_PASSWORD doesn't evaluate the environment variable, takes it as literal string
Callum Robertson
Callum Robertsonabout 6 years ago(edited)
yeah... it's a bit painful...
Callum Robertson
Callum Robertsonabout 6 years ago
Seriously considering moving to Workspaces with the DependsOn between modules now
joshmyers
joshmyersabout 6 years ago
Sounds like you are talking about different problems there….
joshmyers
joshmyersabout 6 years ago
Have you looked at the docs? https://www.runatlantis.io/docs/custom-workflows.html#use-cases Specifically the -env directive
Callum Robertson
Callum Robertsonabout 6 years ago
yes I have, can I use the value or the command variants of the - env in subsequent -run steps?
Callum Robertson
Callum Robertsonabout 6 years ago
e.g.
- env:
    name: TEST
    value: test_value
- run: echo $TEST
joshmyers
joshmyersabout 6 years ago
I believe so yes
Callum Robertson
Callum Robertsonabout 6 years ago
Ah you're a legend @joshmyers - thanks for this!
Callum Robertson
Callum Robertsonabout 6 years ago
This should really be documented better 😂
Padarn
Padarnabout 6 years ago
Hi guys is there a way to see the running log of an atlantis apply, or cancel it? we seem to have a stuck plan
Adrian
Adrianabout 6 years ago
Quick question, is this approach correct.
One github repo with production and staging terragrunt manifests
Separated atlantis service for stage and prod
one atlantis.yaml for both with different workflows
aaratn
aaratnabout 6 years ago
Anyone have experience setting up atlantis to run ansible ?
aaratn
aaratnabout 6 years ago
Is that even possible ?
PePe Amengual
PePe Amengualabout 6 years ago
you can run whatever you want in a shell script with a custom run command
PePe Amengual
PePe Amengualabout 6 years ago
but you need the software installed etc in case you are running on a container
aaratn
aaratnabout 6 years ago
Got it ! So I was thinking same, writing a custom shell wrapper
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)about 6 years ago
Ya, it's no different than running #terragrunt - so check out one of those guides and it will probably help
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)about 6 years ago
We've also run #helmfile under #atlantis