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

Atlantis crashes on atlantis apply with Terraform Cloud #1804

Closed
blytheaw opened this issue Sep 10, 2021 · 0 comments · Fixed by #1931
Closed

Atlantis crashes on atlantis apply with Terraform Cloud #1804

blytheaw opened this issue Sep 10, 2021 · 0 comments · Fixed by #1931
Labels
bug Something isn't working

Comments

@blytheaw
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

After upgrading to v0.17.3, we are experiencing a go runtime error on atlantis apply commands when using Terraform Cloud remote execution. Specifically, the apply is triggered successfully and the plan starts in Terraform Cloud on the workspace. Once the plan finishes and is waiting for confirmation, atlantis crashes and the plan is left in pending state on the workspace in Terraform Cloud.

If I initiate the remote apply from my local machine with the same Terraform version that Atlantis is using, it is successful.

Reproduction Steps

Logs

Error

Error: goroutine panic. This is a bug.

Stacktrace

runtime error: invalid memory address or nil pointer dereference
/opt/hostedtoolcache/go/1.17.0/x64/src/runtime/panic.go:221 (0x449106)
/opt/hostedtoolcache/go/1.17.0/x64/src/runtime/signal_unix.go:735 (0x4490d6)
/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/version.go:371 (0x84d1f9)
/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/version.go:118 (0x84c646)
/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/version.go:305 (0xc6c87a)
/home/runner/work/atlantis/atlantis/server/core/runtime/plan_step_runner.go:292 (0xc6c84a)
/home/runner/work/atlantis/atlantis/server/core/runtime/apply_step_runner.go:202 (0xc693f3)
/home/runner/work/atlantis/atlantis/server/core/runtime/apply_step_runner.go:165 (0xc68f99)
/home/runner/work/atlantis/atlantis/server/core/runtime/apply_step_runner.go:44 (0xc681a7)
/home/runner/work/atlantis/atlantis/server/events/project_command_runner.go:415 (0xe3c239)
/home/runner/work/atlantis/atlantis/server/events/project_command_runner.go:356 (0xe3b012)
/home/runner/work/atlantis/atlantis/server/events/project_command_runner.go:164 (0xe39124)
/home/runner/work/atlantis/atlantis/server/events/project_command_pool_executor.go:47 (0xe38b77)
/home/runner/work/atlantis/atlantis/server/events/apply_command_runner.go:144 (0xe19ae7)
/home/runner/work/atlantis/atlantis/server/events/command_runner.go:214 (0xe1d543)
/opt/hostedtoolcache/go/1.17.0/x64/src/runtime/asm_amd64.s:1581 (0x463f40)

Environment details

  • Atlantis version: v0.17.3
  • Atlantis flags:
    • ATLANTIS_TFE_TOKEN:
    • ATLANTIS_GH_APP_ID: <app_id>
    • ATLANTIS_WRITE_GIT_CREDS: true
    • ATLANTIS_GH_APP_KEY_FILE: /home/atlantis/atlantis-app-key.pem
    • ATLANTIS_ALLOW_DRAFT_PRS: false
    • ATLANTIS_CHECKOUT_STRATEGY: branch
    • ATLANTIS_DISABLE_APPLY_ALL: false
    • ATLANTIS_HIDE_PREV_PLAN_COMMENTS: true
    • ATLANTIS_REPO_CONFIG_JSON: (below yaml converted to JSON via Terraform)
    • ATLANTIS_AUTOMERGE: true

Atlantis server-side config file:

repos:
  - id: /.*/
    apply_requirements:
      - undiverged
      - mergeable

Repo atlantis.yaml file:

version: 3
projects:
  - dir: ecs/us-east-1
  - dir: ecs/us-east-1-dev
  - dir: ecs/us-east-1-prod
    autoplan:
      when_modified: []
  - dir: iam/global

  • We are using Terraform Cloud for remote state and remote execution.

Additional Context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant