Interview Prep/Terraform/Authentication and Cloud API Errors

GitHub Actions log says `It looks like you might be trying to authenticate with OIDC. Did you mean to set the id-token permission?`

BeginnerTroubleshootingAuthentication and Cloud API Errors
Answer

Likely causes → The workflow lacks permissions: id-token: write, so no OIDC token can be requested.

Diagnose → Check the job/workflow permissions: block.

Fix →

permissions:
  id-token: write
  contents: read

Prevent → Keep a reusable Terraform workflow with the right permissions instead of copy-pasting YAML.

All Terraform questions

More on Authentication and Cloud API Errors