Skip to content

Interactive Verification Quiz

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

Please test your knowledge below before continuing.

#

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?

#

If a data block references a real cloud resource, and someone deletes that resource outside Terraform entirely, what happens on the next terraform plan?

#

During terraform apply, 6 of 7 planned resources succeed and 1 fails with an unrelated error (e.g. a network timeout on an external API call). What state are the 6 successful resources in afterward?

#

In a multi-repo Terraform setup using Consul KV instead of terraform_remote_state for cross-repo data sharing, what's the main advantage of the Consul approach?

#

You edit a variable's default value in variables.tf, but terraform.tfvars already sets that same variable. Which value does Terraform actually use?

#

GKE node pools implicitly use the default Compute Engine service account unless one is explicitly specified. What are the two independent reasons NOT to rely on it, beyond just "it might not exist yet"?

#

You set remove_default_node_pool = true on a google_container_cluster resource and give the SEPARATE google_container_node_pool resource a proper node_config with a dedicated service account. Cluster creation still fails on a missing-service-account error. Why?

#

A terraform apply fails partway through creating a cloud resource (e.g. a GKE cluster) due to an unrelated error. The next apply attempt fails with 'Already exists' because the resource is now real in the cloud but absent from Terraform state. What's the right general decision criterion for import vs delete-and-recreate?

#

A repo has local.static_envs = ["dev", "qa"] and separately a var.static_env boolean that controls review-environment behavior. Does Terraform automatically ensure these two stay consistent (e.g. that running on the 'dev' workspace automatically sets static_env = true)?

#

One local value is wrapped in try(..., "") with a null-check before use (feeding a graceful mock-data fallback). A different local value in the same repo calls jsondecode directly with no guard, and fails loudly if the upstream data is missing. Is the unguarded one necessarily worse code?

#

A local value filters out entries whose upstream dependency doesn't exist yet, e.g. { for k, v in x : k => v if condition }. Two other resources elsewhere in the same repo still do for_each = toset(local.full_unfiltered_list) and then index into the now-filtered map directly. What happens?

#

A resource has count = local.some_condition ? 1 : 0. When the condition is false, what actually happens to that resource?

#

A module block uses for_each over a map filtered down to only enabled entries: for_each = { for k, v in x : k => v if v.enabled }. If both entries in the map are disabled, what does for_each-over-modules actually do?

#

In a dependency chain repo-A → repo-B → repo-C (each publishing data the next consumes via Consul), repo-C fails with an 'Invalid index' error trying to read a key that's supposed to come from repo-A. What's the most likely root cause?

#

Two different Terraform learners hit the same unfamiliar syntax. One says 'I never knew that' after seeing the answer; the other says 'I should have thought of that.' What's the practical teaching implication of this difference?

#

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 the provider, rather than a resource or a static/stored value?

#

Compared to a resource block, which of the following is true of a data block?

Quiz Progress

0 / 0 questions answered (0%)

0 correct