runatlantis / atlantis

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

GitHub secrets to env variables in Atlantis.yaml #3452

Open r-pra opened 1 year ago

r-pra commented 1 year ago

Discussed in https://github.com/runatlantis/atlantis/discussions/3450

Originally posted by **r-pra** May 25, 2023 Hello, I am currently facing a blocker. I am not able to pull my GitHub secrets (AWS access keys) to my Atlantis.yaml file (on my repo). This my current config: ``` version: 3 projects: - name: project1 dir: all/core/ terraform_version: v0.14.7 workflow: terraform workflows: terraform: plan: steps: - env: name: AWS_ACCESS_KEY_ID value: ${{secrets.AWS_ACCESS_KEY_ID}} - env: name: AWS_SECRET_ACCESS_KEY value: ${{secrets.AWS_SECRET_ACCESS_KEY}} - env: name: AWS_DEFAULT_REGION value: ${{secrets.AWS_DEFAULT_REGION}} - init - plan ``` If I output the AWS_ACCESS_KEY_ID variable for example, I get "${{secrets.AWS_ACCESS_KEY_ID}}" as a string. Did anyone face a similar issue? Thank you 😺
jamengual commented 1 year ago

you can't run atlantis in a github action. You can't access secrets from github in atlantis. Github actions run in a very different lifecycle.