Question 303 of 519
Interact with Terraform moduleshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is an incorrect attribute reference in the module’s output block. When Terraform evaluates an output value, it reads the exact attribute specified; if that attribute does not exist on the resource—due to a typo like `arnn` instead of `arn`, or referencing a field like `id` when the bucket ARN is needed—Terraform will either return an empty string during apply or fail during plan. This is a common trap on the HashiCorp Terraform Associate TF-003 exam, which tests your understanding of how outputs depend on resource schema and attribute validation. The exam often presents a scenario where the output appears correct but the underlying attribute name is wrong, leading to a silent empty value rather than an error. To avoid this, always verify resource attribute names against the provider documentation and use `terraform console` to inspect the resource’s actual attributes. Memory tip: “Outputs are only as good as their attributes—misspell the attribute, miss the value.”

TF-003 Interact with Terraform modules Practice Question

This TF-003 practice question tests your understanding of interact with terraform modules. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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.

A developer creates a module that provisions an AWS EC2 instance and an S3 bucket. The module outputs the instance ID and bucket ARN. When using this module, the root configuration references module.my_module.instance_id and module.my_module.bucket_arn. After running terraform apply, they notice that the bucket ARN is empty. 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
Full question →

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 output value in the module is defined incorrectly, e.g., referencing a non-existent attribute.

Option C is correct because the most likely cause of an empty output value is that the output block in the module references an attribute that does not exist on the resource. For example, if the output is defined as `output "bucket_arn" { value = aws_s3_bucket.my_bucket.arn }` but the resource is actually `aws_s3_bucket.my_bucket` and the correct attribute is `arn`, a typo like `arnn` or `id` would cause Terraform to return an empty string (or an error during plan). Terraform validates attribute references at plan time, but if the attribute is missing or misspelled, the output value will be empty or cause a failure.

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 output is defined in the module but not in the root configuration.

    Why it's wrong here

    Outputs are defined in the module; root configuration only references them.

  • The S3 bucket creation depends on another resource that hasn't been created yet.

    Why it's wrong here

    Dependencies are handled by Terraform; if the bucket is created, its ARN should be available.

  • The output value in the module is defined incorrectly, e.g., referencing a non-existent attribute.

    Why this is correct

    A misdefined output evaluates to empty or null, leading to an empty value.

    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.

  • The IAM role used by Terraform does not have permission to read the bucket ARN.

    Why it's wrong here

    Permission issues would result in an error, not an empty output.

Common exam traps

Common exam trap: answer the scenario, not the keyword

HashiCorp often tests the misconception that missing outputs in the root configuration cause empty values, but the real issue is almost always a misconfigured output block in the module itself, such as referencing a wrong attribute name.

Trap categories for this question

  • Command / output trap

    Outputs are defined in the module; root configuration only references them.

Detailed technical explanation

How to think about this question

Under the hood, Terraform outputs are resolved during the apply phase after all resources have been created. If an output references a non-existent attribute, Terraform will either produce an error during planning (if the attribute is clearly invalid) or silently return an empty string if the attribute is valid but not set (e.g., a computed attribute that is not yet known). In real-world scenarios, this often happens when a developer copies an output from documentation but uses a deprecated attribute name, such as `bucket_arn` instead of `arn` for an S3 bucket, or `public_ip` instead of `public_dns` for an EC2 instance.

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 output value in the module is defined incorrectly, e.g., referencing a non-existent attribute. — Option C is correct because the most likely cause of an empty output value is that the output block in the module references an attribute that does not exist on the resource. For example, if the output is defined as `output "bucket_arn" { value = aws_s3_bucket.my_bucket.arn }` but the resource is actually `aws_s3_bucket.my_bucket` and the correct attribute is `arn`, a typo like `arnn` or `id` would cause Terraform to return an empty string (or an error during plan). Terraform validates attribute references at plan time, but if the attribute is missing or misspelled, the output value will be empty or cause a failure.

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.