Complete the code to specify the GCP provider in Terraform.
provider "google" { project = "[1]" }
The project attribute specifies your Google Cloud project ID. It must match your actual GCP project.
Complete the code to specify the region for the GCP provider.
provider "google" { project = "my-gcp-project" region = "[1]" }
The region attribute sets the geographic location for your resources. 'us-central1' is a valid GCP region.
Fix the error in the provider block by completing the missing attribute.
provider "google" { project = "my-gcp-project" region = "us-central1" [1] = "/path/to/credentials.json" }
The credentials attribute specifies the path to your service account JSON key file for authentication.
Fill both blanks to configure the provider with project and region variables.
variable "project_id" { type = string } variable "region" { type = string } provider "google" { project = "[1]" region = "[2]" }
Use var.project_id and var.region to reference the declared variables in the provider block.
Fill all three blanks to configure the provider with project, region, and credentials variables.
variable "project_id" { type = string } variable "region" { type = string } variable "credentials_path" { type = string } provider "google" { project = "[1]" region = "[2]" credentials = "[3]" }
Reference the variables var.project_id, var.region, and var.credentials_path correctly in the provider block.