Use terraform github actions without TFC

Is it possible to use github actions and terraform without supplying a cloud token?
The terraform documentation and github repository contradict in that supplying the token is optional, but when i run a github action job it fails saying that i need a token for terraform cloud.

In short, I dont want or need to use terraform cloud

I would really like to know ! I am currently using a gcs provider and want to use github actions as well

@antoineqian,

AFAIK you could do this with TF CE (caveat have not tested this). If you did opt to use TF CE you would have to use/build your own self-hosted runner with TF CE installed and use something for state management. Since you have to manage state elsewhere, why not TFC?

I used GitHub - hashicorp/setup-terraform: Sets up Terraform CLI in your GitHub Actions workflow. in conjonction with GitHub - google-github-actions/auth: A GitHub Action for authenticating to Google Cloud.

1 Like