Editions, Install & Auth
Before running any Terraform, three setup questions: which edition to use, how to install it, and how it authenticates to Google Cloud. With these settled, the workflow and commands page is where you actually drive it.
Editions
Terraform ships in three editions. Community Edition is free and CLI-only; Cloud and Enterprise add a GUI and concurrent deployments.
Community Edition runs only on your local machine, is driven only through the CLI (no GUI), and does not support concurrent deployments. It also has no built-in version control, so it cannot track changes or guarantee your commits do not drift the infrastructure. Cloud and Enterprise remove these limits. Enterprise is self-hosted, so it carries high operational overhead; Cloud is SaaS, so its overhead is low.
Installing Terraform
Install Terraform on your local machine as a binary package or via a package manager. Manual install on Windows:
- Download the package that meets your system requirements.
- Extract the package - Terraform is a single binary called
terraform. - Edit the
PATHvariable to include Terraform. - Verify with
terraform -helpin a new terminal.
The course materials say Terraform is pre-installed on Cloud Shell, but it is not
anymore - and a plain install does not survive a new session (Cloud Shell rebuilds the VM).
Install it from the HashiCorp apt repo inside ~/.customize_environment so the install
re-runs on every session start:
Authenticating to Google Cloud
The authentication mechanism depends on where Terraform runs. It is the Google Cloud provider - not Terraform itself - that authenticates to the resource APIs to create resources.
When Terraform runs outside Google Cloud, supply a downloaded JSON key via
the GOOGLE_APPLICATION_CREDENTIALS environment variable. But keys are
long-lived and cannot be rotated automatically, and must be protected. Prefer
workload identity and workload identity federation, which mint
short-lived tokens and avoid a stored key file entirely.