Question 102 of 519
Interact with Terraform moduleshardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the module version 5.0.0 does not support the 'enable_vpn_gateway' argument. This is because Terraform modules define a strict contract of input variables in their `variables.tf` file; when you pass an argument that isn't declared in that version, Terraform throws the "Unsupported argument" error rather than silently ignoring it. On the HashiCorp Terraform Associate TF-003 exam, this question tests your understanding of module versioning and variable contracts—a common trap is assuming any argument from a newer module version will work in an older one, or confusing this error with a missing provider. The search intent "unsupported argument error module version" directly points to this mismatch between the argument you're passing and the module's declared variables. Memory tip: think of a module version like a hotel room key—it only opens the doors (variables) that were built into that specific version, not the ones added in a later renovation.

TF-003 Interact with Terraform modules Practice Question

This TF-003 practice question tests your understanding of interact with terraform modules. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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.

```hcl
module "vpc" {
  source = "terraform-aws-modules/vpc/aws"
  version = "5.0.0"
  name = "my-vpc"
  cidr = "10.0.0.0/16"
  azs             = ["us-east-1a", "us-east-1b"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24"]
  enable_nat_gateway = true
  enable_vpn_gateway = false
}

output "vpc_id" {
  value = module.vpc.vpc_id
}
```

A developer runs `terraform plan` and receives the error: "Error: Unsupported argument; An argument named 'enable_vpn_gateway' is not expected here." What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Read the full VPN explanation →

Exhibit

Refer to the exhibit.

```hcl
module "vpc" {
  source = "terraform-aws-modules/vpc/aws"
  version = "5.0.0"
  name = "my-vpc"
  cidr = "10.0.0.0/16"
  azs             = ["us-east-1a", "us-east-1b"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24"]
  enable_nat_gateway = true
  enable_vpn_gateway = false
}

output "vpc_id" {
  value = module.vpc.vpc_id
}
```

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

The module version 5.0.0 does not support the 'enable_vpn_gateway' argument.

Option D is correct because the error 'Unsupported argument' indicates that the module version currently in use does not define an input variable named 'enable_vpn_gateway'. In Terraform, each module version has a fixed set of input variables; if you attempt to pass an argument that is not declared in the module's variables.tf, Terraform will reject it. The most common reason for this is that the module version has been updated or changed, and the argument was removed or renamed in that version.

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.

  • The source address is misspelled 'vpc' instead of 'vpc/aws'.

    Why it's wrong here

    The source address is correct for the VPC module; the error is about an argument, not the source.

  • The source module is not pinned to a specific version, so it may have changed.

    Why it's wrong here

    The version is explicitly pinned to 5.0.0, so version drift is not the issue.

  • The module must be sourced from a different registry or repository.

    Why it's wrong here

    There is no indication the module should come from a different location.

  • The module version 5.0.0 does not support the 'enable_vpn_gateway' argument.

    Why this is correct

    The error clearly states the argument is not expected; it was likely removed in that version.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

HashiCorp often tests the distinction between errors caused by module version changes versus errors caused by source configuration issues, trapping candidates who confuse a missing variable error with a source path or registry problem.

Detailed technical explanation

How to think about this question

Terraform modules define their input variables in a `variables.tf` file using `variable` blocks. When you pass an argument in a `module` block, Terraform validates it against the declared variables; any argument not matching a declared variable triggers an 'Unsupported argument' error. This is a strict schema check, similar to how Terraform validates resource arguments against the provider schema. In practice, when upgrading a module from version 4.x to 5.x, the `enable_vpn_gateway` argument might have been removed or replaced with a different argument like `vpn_gateway_enabled`, causing this exact error.

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

A practitioner preparing for the TF-003 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

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 TF-003 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 TF-003 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 TF-003 question test?

Interact with Terraform modules — This question tests Interact with Terraform modules — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The module version 5.0.0 does not support the 'enable_vpn_gateway' argument. — Option D is correct because the error 'Unsupported argument' indicates that the module version currently in use does not define an input variable named 'enable_vpn_gateway'. In Terraform, each module version has a fixed set of input variables; if you attempt to pass an argument that is not declared in the module's variables.tf, Terraform will reject it. The most common reason for this is that the module version has been updated or changed, and the argument was removed or renamed in that version.

What should I do if I get this TF-003 question wrong?

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

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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

Keep practising

More TF-003 practice questions

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 TF-003 practice question is part of Courseiva's free HashiCorp 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 TF-003 exam.