#atlantis - July 2021

atlantisArchived
18 messages

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

Callum Robertson
Callum Robertsonover 5 years ago
Hey question about Atlantis checks, we're experiencing an issue where after an apply is run, even after there are errors in stdout the apply check marks as successful, is this behaviour expected?
joshmyers
joshmyersover 5 years ago
Nope.
Callum Robertson
Callum Robertsonover 5 years ago
We're using a Terragrunt worfklow.
    apply:
      steps:
        - env:
            name: TERRAGRUNT_TFPATH
            command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
        - run: terragrunt apply-all -no-color --terragrunt-parallelism 4 --terragrunt-non-interactive | grep -v 'terragrunt'
joshmyers
joshmyersover 5 years ago
Yeah, because you are using $action-all which fucks with stdout
Callum Robertson
Callum Robertsonover 5 years ago
Ah lame =(
joshmyers
joshmyersover 5 years ago
Don't use plan-all/apply-all, they aren't safe.
joshmyers
joshmyersover 5 years ago
Maybe alluring, but really not safe.
Callum Robertson
Callum Robertsonover 5 years ago
Thanks for the quick response @joshmyers! Very alluring, but yes, we recognise that it's not good practice. Originally was using it for larger deployments that were modular, so we were creating atlantis projects to run the commands with the dependencies block. Since moved away from that but still using the same workflow
Callum Robertson
Callum Robertsonover 5 years ago
Easy fix, thanks again 🙂
Callum Robertson
Callum Robertsonover 5 years ago(edited)
@joshmyers do you use -auto-approve flag in your workflow that doesn't have the *-all ?
joshmyers
joshmyersover 5 years ago
default_apply_args = list("-auto-approve", get_env("PLANFILE", "tfplan"))
Piotr Hryszko
Piotr Hryszkoover 5 years ago
hey, i have a project that uses .tfvars files, a file per environment. Each environment uses it’s own backend stored in the same account as all other resources. What would be a good way to do terraform init for each environment and pass different configuration?
Piotr Hryszko
Piotr Hryszkoover 5 years ago
i guess this section of docs applies here https://www.runatlantis.io/docs/custom-workflows.html#custom-backend-config however I’m not sure how the content of custom backend file would look like, ant pointers please?
Piotr Hryszko
Piotr Hryszkoover 5 years ago
please ignore the question, it’s just standard terraform backend config file 🤦
Arjun Venkatesh
Arjun Venkateshover 5 years ago
Hey There,
We are currently using Terragrunt for Atlantis workflow and recently updated the Atlantis image to the latest one.
Now, when we try to do a plan, it succeeds and shows the plan out put as:
Arjun Venkatesh
Arjun Venkateshover 5 years ago
but, when we try to comment the apply command it throws 2 different types of errors:
1. When you just comment "atlantis apply"
Ran Apply for 0 projects:

2. When you comment "atlantis apply -d test/myproject", it throws the following error
exit status 1: running "terragrunt apply -no-color $$PLANFILE" in "/home/atlantis/.atlantis/repos/myrepo/myproject": 

Error: Failed to load "2408PLANFILE" as a plan file

Error: stat 2408PLANFILE: no such file or directory
time=2021-07-28T17:40:15Z level=error msg=1 error occurred:
	* exit status 1

Arjun Venkatesh
Arjun Venkateshover 5 years ago
anyone faced something like this before? or any pointers on what I should be looking at?
Jurgen
Jurgenover 5 years ago(edited)
so, I started up atlantis for my terraform code base, it was working fine… Now I am getting this error on init

Error: Failed to install provider from shared cache

How do I resolve it? Do I really just not commit the lock files like threads are suggesting, seems broken.

The weird thing is, it worked for a few plans/PR’s/commits and now its coming up with this.