runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.73k stars 1.05k forks source link

terraform1.5.7: not found in `0.26.0` #3894

Open ChrisJBurns opened 11 months ago

ChrisJBurns commented 11 months ago

Overview of the Issue

We upgraded our Atlantis from 0.25.0 to 0.26.0 and we are now experiencing Terraform binary not found errors.

image

On 0.25.0 it downloads the binary with no issue, but for some reason on 0.26.0 it just exits when it can't find the binary and doesn't seem to want to download it.

Environment details

Repo atlantis.yaml file:

version: 3
automerge: false
projects:
  - name: root
    dir: .
    workspace: env
    terraform_version: v1.5.7
    autoplan:
      when_modified: ["*.tf", "./**/*.tf", "./**/*.tf*"]
      enabled: true
    apply_requirements: [approved]
    workflow: our-workflow
workflows:
 our-workflow:
    plan:
      steps:
        - run: echo "$$$--- ATLANTIS VERSION ---$$$"
        - run: atlantis version
        - run: echo "$$$--- TERRAFORM VERSION ---$$$"
        - run: /home/atlantis/.atlantis/bin/terraform${ATLANTIS_TERRAFORM_VERSION} version
        - run: echo "Plan pipeline started"
        - run: aws s3 cp s3://our-bucket/git-crypt-pub-key.gpg .
        - run: mkdir -p /home/atlantis/.ssh
        - run: mkdir -p /home/atlantis/.aws
        - run: echo "[profile our-env]" > /home/atlantis/.aws/config
        - run: echo "region = eu-west-2" >> /home/atlantis/.aws/config
        - run: aws s3 cp s3://our-bucket/atlantis /home/atlantis/.ssh/id_rsa
        - run: aws s3 cp s3://our-bucket/known_hosts /home/atlantis/.ssh/known_hosts
        - run: chmod 600 /home/atlantis/.aws/config
        - run: chmod 700 /home/atlantis/.ssh
        - run: chmod 600 /home/atlantis/.ssh/*
        - run: git-crypt unlock git-crypt-pub-key.gpg
        - run: echo "Atlantis is going to plan for the entirerepo ...."
        - init
        - plan:
            extra_args: ["-lock=false -var-file=environments/env.tfvars -parallelism=50"]
        - run: echo "Plan pipeline finished"

    apply:
      steps:
        - run: echo "Apply pipeline started"
        - apply:
            extra_args: ["-lock=true -parallelism=50"]
        - run: echo "Apply pipeline finished"
jamengual commented 11 months ago

Do you have any other projects with different versions of TF that it does work?

ChrisJBurns commented 11 months ago

Nope, we only use Atlantis on one project. 1.5.7 was ok on 0.25.0, it just seems like 0.26.0 is having an issue with it