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

Error using Terraform Cloud as Remote #915

Closed
fniko opened this issue Jan 27, 2020 · 5 comments
Closed

Error using Terraform Cloud as Remote #915

fniko opened this issue Jan 27, 2020 · 5 comments
Labels
duplicate This issue is a duplicate of an already reported issue

Comments

@fniko
Copy link

fniko commented Jan 27, 2020

Hi,
according to docs, I would like to use Atlantis to execute commands inside my Terraform Cloud.

However, I am receiving errors and I am unable to make it work:
Command:

atlantis plan -d .

Eror:

running "/atlantis-data/bin/terraform0.12.19 plan -input=false -refresh -no-color -out \"/atlantis-data/repos/DevOps/terraform/1/default/default.tfplan\"" in "/atlantis-data/repos/DevOps/terraform/1/default": exit status 1

Error: Saving a generated plan is currently not supported

The "remote" backend does not support saving the generated execution plan
locally at this time.

TF Cloud Setup:

  • TF Version: 0.12.19
  • Execution mode: Remote

Atlantis config:
(using helm)

orgWhitelist: mygit.com/*
logLevel: "debug"

gitlab:
  user: [email protected]
  hostname: mygit.com

#! Used secrets instead, for gitlab, git connection and AWS
vcsSecretName: atl-webhook
gitconfigSecretName: atl-gitconfig

image:
  repository: runatlantis/atlantis
  tag: v0.8.2
  pullPolicy: IfNotPresent

## default terraform version to be used
defaultTFVersion: 0.12.19

# disableApplyAll disables running `atlantis apply` without any flags
disableApplyAll: false

service:
  type: ClusterIP
  port: 8000

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
  path: /
  host: atlantis.mygit.com
  tls:
    - secretName: atlantis-tls
      hosts:
        - atlantis.mygit.com

replicaCount: 1

resources:
  requests:
    memory: 1Gi
    cpu: 100m
  limits:
    memory: 1Gi
    cpu: 100m

dataStorage: 2Gi

test:
  enabled: true
  image: lachlanevenson/k8s-kubectl
  imageTag: v1.4.8-bash

serviceAccount:
  create: true
  name: atlantis-service

environmentSecrets:
  - name: ATLANTIS_TFE_TOKEN
    secretKeyRef:
      name: atl-tfcloud
      key: ATLANTIS_TFE_TOKEN

Atlantis log:

[DBUG] Building plan command
[DBUG] Cloning repository
[DBUG] Clone directory "/atlantis-data/repos/DevOps/terraform/1/default" already exists, checking if it's at the right commit
[DBUG] Repo is at correct commit "5878" so will not re-clone
[DBUG] Building config based on server-side config
[DBUG] Setting workflow: "default" from default server config
[DBUG] Setting allowed_overrides: [] from default server config
[DBUG] Setting allow_custom_workflows: false from default server config
[DBUG] Setting apply_requirements: [] from default server config
[INFO] Acquired lock with id "DevOps/terraform/./default"
[DBUG] Acquired lock for project
[DBUG] Clone directory "/atlantis-data/repos/DevOps/terraform/1/default" already exists, checking if it's at the right commit
[DBUG] Repo is at correct commit "5878" so will not re-clone
[INFO] Successfully ran "/atlantis-data/bin/terraform0.12.19 init -input=false -no-color -upgrade" in "/atlantis-data/repos/DevOps/terraform/1/default"
[INFO] Successfully ran "/atlantis-data/bin/terraform0.12.19 workspace show" in "/atlantis-data/repos/DevOps/terraform/1/default"
[EROR] Running "/atlantis-data/bin/terraform0.12.19 plan -input=false -refresh -no-color -out \"/atlantis-data/repos/DevOps/terraform/1/default/default.tfplan\"" in "/atlantis-data/repos/DevOps/terraform/1/default": exit status 1
@fniko fniko changed the title Error: Saving a generated plan is currently not supported Error using Terraform Cloud as Remote Jan 27, 2020
@lkysow
Copy link
Member

lkysow commented Jan 27, 2020

Hey, you need to use the latest version of Atlantis. In your values file you're using 0.8.2. You could actually only upgrade to 0.8.3 which supports TF >= 0.12 for remote plans but I'd recommend just upgrading to the latest version https://github.com/runatlantis/atlantis/releases/

@lkysow lkysow added the waiting-on-response Waiting for a response from the user label Jan 27, 2020
@lkysow
Copy link
Member

lkysow commented Jan 27, 2020

Duplicate of #704 fixed in Atlantis 0.8.3

@lkysow lkysow closed this as completed Jan 27, 2020
@lkysow lkysow added duplicate This issue is a duplicate of an already reported issue and removed waiting-on-response Waiting for a response from the user labels Jan 27, 2020
@martinhanzik
Copy link

Is this the official helm chart? https://github.com/helm/charts/tree/master/stable/atlantis Because in values.yaml it contains the version 0.8.2 and should probably be updated with each release.

@lkysow
Copy link
Member

lkysow commented Jan 27, 2020

Agreed! Unfortunately I have to get approval from someone every time I submit a PR to that repo which is difficult because I'm a solo maintainer so then the PRs just sit there.

If you submit a PR to change it now though then I'll 👍 it.

@martinhanzik
Copy link

As Helm is getting rid of the stable central repository in favour of repos for individual apps (I think), that would probably solve the problem - the chart repo would be under your control completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate of an already reported issue
Projects
None yet
Development

No branches or pull requests

3 participants