Complete the code to specify the Terraform provider for Google Cloud Platform.
provider "google" { project = "my-project-id" region = "us-central1" [1] = "4.0" }
The correct attribute to specify the provider version in Terraform is version.
Complete the code to set the credentials file path for the GCP provider.
provider "google" { credentials = file("[1]") project = "my-project-id" region = "us-central1" }
The credentials file for GCP provider is a JSON file, so the path should point to a .json file.
Fix the error in the provider block by completing the missing attribute for specifying the region.
provider "google" { project = "my-project-id" [1] = "us-west1" credentials = file("/path/to/credentials.json") }
The correct attribute to specify the geographical area for resources is region.
Fill both blanks to configure the provider with project and region variables.
provider "google" { project = var.[1] region = var.[2] credentials = file("/path/to/credentials.json") }
Terraform variables are often named project and region to match provider attributes.
Fill all three blanks to define variables for project, region, and credentials file path.
variable "[1]" { type = string description = "The GCP project ID" } variable "[2]" { type = string description = "The GCP region" } variable "[3]" { type = string description = "Path to the GCP credentials JSON file" }
Common variable names are project, region, and credentials_path for clarity.