Skip to content

Commit

Permalink
pass auth via pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed Oct 16, 2023
1 parent a432676 commit a44a2bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ jobs:
id: plan
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
run: |
terraform plan -no-color -input=false -out=TFplan.JSON
terraform plan -no-color -input=false \
-var="elasticache_auth=${{ secrets.elasticache_auth }}" \
-out=TFplan.JSON
continue-on-error: true

# Generate an Infracost diff and save it to a JSON file.
Expand Down Expand Up @@ -158,4 +160,6 @@ jobs:
# Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks
- name: Terraform Apply
if: github.ref == 'refs/heads/main'
run: terraform apply -auto-approve -input=false
run: |
terraform apply -auto-approve -input=false \
-var="elasticache_auth=${{ secrets.elasticache_auth }}"

0 comments on commit a44a2bf

Please sign in to comment.