Skip to content

Quiz — Providers, Auth, Versions & Backends

Quiz results are saved to your browser's local storage and will persist between sessions.

How the google provider authenticates, required_providers vs provider {}, version constraints (~>), lock files, provider aliasing, and backend initialization. Reference: §1 Execution Model & Providers and §2 State & Backends.

10 questions. Back to all topics

#

What does gcloud auth application-default login actually create, and where?

#

Does terraform init create or touch terraform.tfstate?

#

A provider block sets project = var.project_id, but every resource in the module also sets its own explicit project = var.project_id. What happens if you delete the provider block's project line entirely?

#

What's the actual difference between the required_providers block in a terraform{} block and a provider "google" {} config block?

#

Why is data "google_client_config" used to supply the GCP access token to downstream providers (kubernetes, helm), rather than a resource or a static/stored value?

#

What is the exact difference between the version constraints version = "~> 2.4.1" and version = "~> 2.4"?

#

Why should .terraform.lock.hcl be committed to Git in production repositories while .terraform/ is gitignored, and why must a teammate still run terraform init after cloning?

#

You define a secondary provider block provider "google" { alias = "us_east" ... } in your root module and call a child module module "east_storage" { source = "./modules/storage" }. How does the child module use the us_east provider?

#

Why can't a Terraform configuration create the GCS bucket defined in its own backend "gcs" {} block, and what happens if you use a partial backend "gcs" {} block and forget to pass -backend-config during terraform init?

#

terraform apply on a google_storage_bucket fails with Error 412: constraints/storage.uniformBucketLevelAccess. What does this error mean and what is the fix?

Quiz Progress

0 / 0 questions answered (0%)

0 correct