Closed singhswg closed 2 years ago
I am not specifying a separate atlantis.yml in the repo
Test specifying atlantis.yaml
as was talked here - https://github.com/runatlantis/atlantis/issues/1204, and passed repos.yaml
to server -
It did not work either
#version: 3
#projects:
#- name: test-workflow
# dir: .
# workflow: flow1
#workflows:
# flow1:
# plan:
# steps:
# - env:
# name: AWS_PROFILE
# value: staging
# - init
# - plan
# apply:
# steps:
# - env:
# name: AWS_PROFILE
# value: staging
# - plan
# - apply
This might be due to the providers being locked for one arch but Atlantis running as another. I usually lock for all providers. Try locking for all arches and then committing the updated lockfile:
terraform providers lock -platform=windows_amd64 -platform=darwin_amd64 -platform=linux_amd64 -platform=darwin_arm64
Community Note
Overview of the Issue
Hi! I am getting a
NoCredentialProviders: no valid providers in chain
error while runningatlantis plan
. I am running atlantis in a container and weirdly if iexec
into the container and executeterraform init/plan
it works.Not sure why atlantis cannot find credentials.
Reproduction Steps
Running atlantis in a container -
Mapping local credentials file to atlantis container as shown above which has 2 profiles - default and staging
Logs
Logs from Atlantis server -
Atlantis error message -
Environment details
Provider.tf picking credentials like -
backend.tf picking credentials like -
Any other information you can provide about the environment/deployment.
atlantis plan
failsterraform plan
from container directly works