hashicorp / hashicorp/setup-terraform

Missing documentation on how to pass variables to terraform

Open
#35 10 comments 20 reactions 0 assignees View on GitHub
documentation
Dominant language
JavaScript
Stars
1.6k
Forks
288
Avg merge
23h 21m
Merged PRs (30d)
3

Description

There is currently no documentation on how to pass variables to terraform.

Additionally, it seems like setting environment variables TF_VAR have no effect:
```yaml
name: Production CI

env:
TF_VAR_image_tag: ${{ github.sha }}

on:
push:
branches: [ master ]

jobs:
provision:
runs-on: ubuntu-latest

steps:
- name: Clone the repository code
uses: actions/checkout@v2

- name: Setup the Terraform CLI
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_CREDENTIALS }}
env:
TF_VAR_image_tag: ${{ github.sha }}

- name: Initialize the Terraform working directory
working-directory: ./terraform
id: init
run: terraform init
env:
TF_VAR_image_tag: ${{ github.sha }}

- name: Apply the Terraform execution plan
working-directory: ./terraform
id: plan
run: terraform apply -auto-approve -no-color
env:
TF_VAR_image_tag: ${{ github.sha }}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.