Skip to content

Commit 7b6bcd5

Browse files
committed
fix: pass vars as cli args
1 parent 2dd2693 commit 7b6bcd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/terraform.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
name: 'Terraform'
1414
runs-on: ubuntu-latest
1515
environment: production
16-
env:
17-
TF_VAR_admin_ssh_key: ${{ secrets.SSH_ADMIN_PUBKEY }}
18-
TF_VAR_vultr_api_key: ${{ secrets.VULTR_API_KEY }}
1916

2017
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
2118
defaults:
@@ -35,7 +32,10 @@ jobs:
3532

3633
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
3734
- name: Terraform Init
38-
run: terraform -chdir=./terraform init
35+
run: |
36+
terraform -chdir=./terraform init \
37+
-var='admin_ssh_key=${{ secrets.SSH_ADMIN_PUBKEY }}' \
38+
-var='vultr_api_key=${{ secrets.VULTR_API_KEY }}'
3939
4040
# Checks that all Terraform configuration files adhere to a canonical format
4141
- name: Terraform Format

0 commit comments

Comments
 (0)