Question 415 of 507
Google Cloud products, services, and solutionseasyMultiple ChoiceObjective-mapped

Cloud Digital Leader Practice Question: Google Cloud products, services, and solutions

This GCDL practice question tests your understanding of google cloud products, services, and solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.
```
resource "google_compute_network" "vpc" {
  name                    = "my-vpc"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "subnet" {
  name          = "my-subnet"
  network       = google_compute_network.vpc.name
  region        = "us-central1"
  ip_cidr_range = "10.0.1.0/24"
}
```

A team uses Terraform to create a VPC as shown. They now need to add a Compute Engine instance in the subnet. Which of the following correctly references the subnet?

Question 1easymultiple choice
Review the full subnetting walkthrough →

Exhibit

Refer to the exhibit.
```
resource "google_compute_network" "vpc" {
  name                    = "my-vpc"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "subnet" {
  name          = "my-subnet"
  network       = google_compute_network.vpc.name
  region        = "us-central1"
  ip_cidr_range = "10.0.1.0/24"
}
```

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Set `subnetwork = google_compute_subnetwork.subnet.self_link`

Option B is correct because when adding a Compute Engine instance to a subnet in Terraform, you must use the `subnetwork` argument (not `network`) and reference the subnet's `self_link` attribute. The `google_compute_subnetwork` resource's `self_link` provides the full URI required by the instance resource to attach to the correct subnet within the VPC.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set `network = google_compute_subnetwork.subnet.self_link`

    Why it's wrong here

    Network expects a VPC, not subnet.

  • Set `subnetwork = google_compute_subnetwork.subnet.self_link`

    Why this is correct

    self_link provides the full URL needed.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Set `subnetwork = google_compute_subnetwork.subnet.name`

    Why it's wrong here

    Requires full URL, not just name.

  • Set `network = google_compute_network.vpc.name` and `subnetwork = google_compute_network.vpc.self_link`

    Why it's wrong here

    Wrong attribute for subnetwork.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the distinction between `network` and `subnetwork` arguments, and the trap here is that candidates confuse the subnet's `name` attribute with its `self_link`, or mistakenly think the `network` argument can accept a subnet reference.

Detailed technical explanation

How to think about this question

In Terraform's Google provider, the `google_compute_instance` resource uses the `subnetwork` argument to attach the instance to a specific subnet, and this argument expects a full URI (self_link) like `projects/{project}/regions/{region}/subnetworks/{name}`. The `network` argument is optional when `subnetwork` is set, but if provided, it must be the VPC's self_link. Under the hood, the Google Cloud API resolves the subnet self_link to determine the VPC, region, and IP range, ensuring the instance is placed correctly. A real-world scenario where this matters is when using shared VPCs, where the subnet self_link includes the host project ID, preventing cross-project misconfigurations.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related GCDL practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free GCDL practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this GCDL question test?

Google Cloud products, services, and solutions — This question tests Google Cloud products, services, and solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Set `subnetwork = google_compute_subnetwork.subnet.self_link` — Option B is correct because when adding a Compute Engine instance to a subnet in Terraform, you must use the `subnetwork` argument (not `network`) and reference the subnet's `self_link` attribute. The `google_compute_subnetwork` resource's `self_link` provides the full URI required by the instance resource to attach to the correct subnet within the VPC.

What should I do if I get this GCDL question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.