Open-source project
hashicorp/terraform-provider-google avatar
hashicorp/terraform-provider-google

terraform-provider-google: the GA provider for GCP, and why your edits belong in magic-modules

Terraform Provider for Google Cloud Platform

2,646 stars1,917 forksGoMPL-2.0

At a glance

What is it?
The hashicorp/terraform-provider-google repository is the generally available Terraform provider for Google Cloud, generated from magic-modules and maintained jointly by Google and HashiCorp. It is the right tool for stable GCP resources, and the wrong place to send a pull request.
Who is it for?
Adopt terraform-provider-google if you manage generally available Google Cloud resources and want a provider maintained jointly by the Terraform team at Google and the Terraform team at HashiCorp, with releases such as v8.4.0 on 2026-09-22.
Can I use it commercially?
Yes, with conditions. MPL-2.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 24, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What terraform-provider-google is for, and who should skip it

The provider is a Terraform plugin that lets Terraform manage resources on Google Cloud Platform. It is not a client library, not a CLI, and not a wrapper around gcloud. You declare resources in HCL, Terraform calls the provider, and the provider calls Google Cloud APIs.

The README is explicit about scope: this is the google provider, containing generally available features. Preview features and features at a beta launch stage live in a separate repository, terraform-provider-google-beta. That split is the single most important thing to understand before you write any configuration, because it determines which provider block you need and therefore which resources are even addressable.

Maintenance is shared. The README states the provider is maintained by the Terraform team at Google and the Terraform team at HashiCorp. The repository is not archived, and the last push was on 2026-09-24, with releases v8.4.0 on 2026-09-22, v8.3.0 on 2026-09-15 and v8.2.0 on 2026-09-08. That cadence is worth noting for planning: version constraints matter more here than in projects that release rarely.

Who is it for? Teams that already run Terraform and want GCP resources under the same plan and apply workflow as the rest of their infrastructure. Who is it not for? Anyone who needs a beta-stage GCP feature today, and anyone looking for a way to script GCP calls without a state file.

How the provider is built: magic-modules generates this repository

This is the part most users never read, and it explains a lot of behaviour that otherwise looks odd. The README says the repository is generated by magic-modules, and that if you wish to work on the provider you need to make changes in magic-modules. Any changes made directly to this repository will likely be overwritten.

So the code you find under google/ is output, not source of truth. The repository layout supports that reading: alongside the generated provider code and website/ documentation there are CHANGELOG files split by major version (CHANGELOG_v0.md through CHANGELOG_v5.md plus the current CHANGELOG.md), a .release/ directory, a .teamcity/ directory, and a terraform-registry-manifest.json. Those are release and publishing machinery, not application code.

The go.mod file shows what the provider is compiled against. It requires both github.com/hashicorp/terraform-plugin-sdk/v2 and github.com/hashicorp/terraform-plugin-framework, plus github.com/hashicorp/terraform-plugin-mux. The mux dependency is the interesting one: it means the provider serves resources implemented against two different plugin frameworks through a single binary. That is a migration in progress, and it is why different resources can behave differently around things like timeouts, which the terraform-plugin-framework-timeouts dependency also hints at.

For a user, the practical consequence is that the provider binary is large and the resource surface is broad, because it covers a very wide slice of GCP rather than a single service.

Installing it and applying a first real resource

You do not install this provider by hand. Terraform resolves it from the registry when you run init, and the README's quick start points at the getting started guide and the provider documentation on the registry.

Start with a provider block and a version constraint. The README notes that the provider does not upgrade automatically once you have started using it, so the constraint is what pins you.

hcl
terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 8.4"
    }
  }
}

provider "google" {
  project = var.project_id
  region  = "us-central1"
}

Then run init. Terraform downloads the provider binary matching your constraint:

bash
terraform init

After init, terraform plan should report that the provider was installed and show whatever resources you have declared. If you have no resources yet, plan will simply report no changes.

The repository ships worked examples under examples/, including examples/two-tier/, examples/shared-vpc/, examples/vpn/, examples/cloud-armor/, examples/internal-load-balancing/, examples/content-based-load-balancing/ and examples/endpoints-on-compute-engine/. These are the closest thing to a tutorial inside the repository itself, and they are more concrete than the README, which defers configuration details to the registry documentation.

When a new release lands and you want to move, the README gives exactly one command:

bash
terraform init -upgrade

That upgrades to the latest stable version of the Google provider. It will still respect your version constraint, so a tight constraint such as ~> 8.4 will not jump you to a later major line. The README points at the Terraform provider versions documentation for how constraints work.

The google versus google-beta decision is not cosmetic

The README describes google-beta as the provider for preview features or features at a beta launch stage, and links to a launch stages page and to provider version documentation. It also notes that both providers can be used together.

This creates a real configuration cost. If a resource you need is beta-only, you cannot simply add it to a google-provider configuration. You declare a second provider block aliased to google-beta, attach it to the specific resources that need it, and accept that those resources now carry a different stability expectation than the rest of your state. The README's own framing, that this repository contains generally available features, is the boundary.

The failure mode is subtle rather than loud. A resource that exists in google-beta but not in google will not be silently downgraded; you get a configuration error about an unsupported resource or argument. That is the good case. The worse case is a beta resource whose schema shifts between minor releases, which is exactly the kind of churn a version constraint is meant to contain and cannot fully, because the constraint pins the provider, not the upstream API.

My read: treat any google-beta usage as a deliberate exception you document, not as a default. If a meaningful share of your configuration needs beta, you have effectively adopted two providers and should plan upgrades accordingly.

Where it breaks: schema churn, generated code and the upgrade treadmill

Three limitations are worth stating plainly.

First, upgrades are manual and versioned. The README says the provider does not upgrade automatically once you have started using it, and the only documented upgrade path is terraform init -upgrade. With releases roughly weekly in the recent record (v8.2.0, v8.3.0, v8.4.0 across September 2026), staying current is a recurring task, not a one-time setup step. The repository carries five archived changelog files for prior major versions, which tells you major-version transitions are a real event rather than a formality.

Second, contributing is indirect. If you find a bug in the provider and open a pull request against this repository, the README warns that changes made directly here will likely be overwritten, because the repository is generated by magic-modules. The contribution path runs through magic-modules and its contribution documentation. That is a genuine barrier for teams used to forking a provider and patching it locally.

Third, documentation lives outside the repository. The README sends you to the registry for provider configuration instructions and to the registry guides for getting started. The website/ directory exists, but the README's own links point at registry.terraform.io. If you are reading the repository expecting a complete configuration reference, you will not find one there.

The wrong-tool case is concrete: if you need to manage GCP resources that are only at a beta launch stage, or you need to patch provider behaviour yourself and ship that patch, this repository is not the right starting point.

Alternatives and how their approach differs

The obvious alternative is terraform-provider-google-beta, which the README names directly. The difference is not quality but launch stage coverage: google-beta exposes preview and beta features that the generally available google provider does not. In practice many teams run both, using google for stable resources and google-beta only where required. The cost is a second provider in the configuration and a second upgrade surface.

A second alternative is to skip Terraform for a given piece of GCP work and use the gcloud CLI or the Google Cloud client libraries directly. That changes the model entirely: no state file, no plan step, no drift detection, but also no dependency on provider releases or schema versions. For one-off provisioning or for resources the provider does not cover, that is often the pragmatic route. It is a worse fit for anything you want reviewed, versioned and reconciled.

A third option is Google Cloud's own infrastructure-as-code tooling, which sits outside this repository and outside the Terraform plugin model. Choosing it means abandoning the Terraform workflow your team may already use for other clouds, so the decision is organizational as much as technical.

The honest comparison: terraform-provider-google wins when you want GCP inside an existing Terraform workflow and your resources are generally available. It loses when you need beta features immediately, or when you want to modify the provider itself.

Licence, maintenance and what an upgrade actually costs

The repository is licensed under MPL-2.0, the Mozilla Public License 2.0. That is a file-level copyleft licence, which matters if you redistribute a modified provider binary: obligations attach to modified files. Using the provider to manage your own infrastructure is not redistribution of the provider. I am not a lawyer and this is not legal advice; check the LICENSE file in the repository and your own counsel for anything beyond ordinary use.

Maintenance signals: the repository is not archived, the last push was on 2026-09-24, and releases landed on 2026-09-08, 2026-09-15 and 2026-09-22. The README names two maintaining teams, one at Google and one at HashiCorp.

Upgrade cost is dominated by three things. The version constraint you set, which determines whether terraform init -upgrade can move you at all. The number of google-beta resources you depend on, since each one is a separate stability bet. And the major-version boundaries, evidenced by the archived CHANGELOG_v0.md through CHANGELOG_v5.md files, which suggest that crossing a major version deserves its own review rather than being folded into routine maintenance.

A practical habit: read CHANGELOG.md before running terraform init -upgrade, and pin with a pessimistic constraint such as ~> 8.4 rather than accepting whatever latest resolves to.

Editorial conclusion

Adopt terraform-provider-google if you manage generally available Google Cloud resources and want a provider maintained jointly by the Terraform team at Google and the Terraform team at HashiCorp, with releases such as v8.4.0 on 2026-09-22. Do not adopt it if you need preview or beta launch stage features, which the README directs to the google-beta provider, or if you intend to patch the provider itself, because the repository is generated by magic-modules and direct changes are likely to be overwritten. Before writing configuration, verify which launch stage each resource is in, pin a version constraint rather than tracking latest, and confirm whether your credentials path is documented in the provider reference guide.

Frequently asked questions

What is the Google Cloud Terraform provider?

It is a Terraform plugin that allows Terraform to manage resources on Google Cloud Platform. This repository is the google provider, containing generally available features, and it is maintained by the Terraform team at Google and the Terraform team at HashiCorp.

Does GCP support Terraform?

Yes. Google Cloud resources are managed through this provider, which is maintained jointly by the Terraform team at Google and the Terraform team at HashiCorp. Features at a preview or beta launch stage are served by the separate google-beta provider.

What is Terraform for Google Cloud used for?

It lets you declare Google Cloud Platform resources in Terraform configuration and have the provider create and manage them. The README points to a getting started guide and the registry documentation for configuration instructions.

Who are the providers of Terraform?

Providers are plugins that Terraform installs to talk to a target platform. This one is the google provider for Google Cloud Platform, and the README states it is maintained by the Terraform team at Google and the Terraform team at HashiCorp.

Official sources

  1. hashicorp/terraform-provider-google on GitHub
  2. License: MPL-2.0
  3. Project website
  4. README
  5. Releases
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/hashicorp-terraform-provider-google.svg)](https://hysenlabs.com/projects/hashicorp-terraform-provider-google)
Community notes

Community notes