The correct provider block uses provider "google" with project and region keys. Option A uses wrong provider name, C uses incorrect keys, and D uses zone instead of region.
If no credentials are provided in the provider block or environment, Terraform cannot authenticate and will fail with an error.
Using multiple provider aliases lets you configure each GCP project separately with its credentials, enabling isolated management within one Terraform codebase.
Workload Identity Federation allows Terraform to authenticate to GCP securely without storing service account keys, reducing risk of key leakage.
provider "google" { version = ">= 4.0, < 5.0" project = "my-project" region = "us-east1" }
The constraint ">= 4.0, < 5.0" means Terraform will use any provider version starting at 4.0 up to but not including 5.0, preventing upgrades to major version 5.