Question 87 of 519
Read, generate and modify configurationeasyMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the AMI is not available in the region specified in the provider configuration. This error occurs because AMI IDs are inherently region-specific; an AMI like ami-0c55b159cbfafe1f0 that exists in us-east-1 will not be found in eu-west-2, as each region maintains its own independent catalog of machine images. Terraform validates the AMI ID against the EC2 API for the region defined in the provider block, and when the ID does not match any image in that region’s inventory, it throws the InvalidAMIID.NotFound error. On the HashiCorp Terraform Associate TF-003 exam, this scenario tests your understanding of provider configuration and resource dependencies across regions—a common trap is assuming AMIs are global. To avoid this, always verify that your AMI ID corresponds to the region set in the provider, or use a data source like aws_ami to dynamically fetch the correct ID. Memory tip: “AMI IDs are zip-coded, not global—match your region or get rejected.”

TF-003 Read, generate and modify configuration Practice Question

This TF-003 practice question tests your understanding of read, generate and modify configuration. 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.

Exhibit

Refer to the exhibit.

```hcl
resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"

  tags = {
    Name = "WebServer"
  }
}
```

Refer to the exhibit. A developer runs 'terraform plan' and receives the following error: 'Error: InvalidAMIID.NotFound: The image id '[ami-0c55b159cbfafe1f0]' does not exist'. 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 1easymultiple choice
Full question →

Exhibit

Refer to the exhibit.

```hcl
resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"

  tags = {
    Name = "WebServer"
  }
}
```

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 AMI is not available in the region specified in the provider configuration.

Option B is correct because the error 'InvalidAMIID.NotFound' indicates that the specified AMI ID does not exist in the AWS region configured in the Terraform provider block. AMI IDs are region-specific; an AMI available in us-east-1 may not exist in eu-west-2. Terraform validates the AMI against the region's EC2 API, and if the ID is not found, it throws this exact error.

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 'tags' block is missing a required 'ami' tag.

    Why it's wrong here

    Tags are optional and not related to AMI availability.

  • The AMI is not available in the region specified in the provider configuration.

    Why this is correct

    AMI IDs are unique per region; the AMI may exist in another region.

    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 'ami' argument is misspelled; it should be 'image_id'.

    Why it's wrong here

    The argument is correctly named 'ami'.

  • The AMI ID is malformed; it should start with 'ami-' but the rest is incorrect.

    Why it's wrong here

    The AMI ID format appears correct; the error says it does not exist, not invalid format.

Common exam traps

Common exam trap: answer the scenario, not the keyword

HashiCorp often tests the misconception that AMI IDs are globally unique across all AWS regions, when in fact they are region-specific, leading candidates to overlook the provider region configuration.

Detailed technical explanation

How to think about this question

Under the hood, Terraform calls the EC2 DescribeImages API during the plan phase to verify the AMI ID exists in the specified region. If the AMI is cross-region, you must either copy it to the target region or use a data source like 'aws_ami' with filters to dynamically retrieve the correct ID. A real-world scenario is using a community AMI from a shared account that is only available in certain regions, causing plan failures if the provider region is misconfigured.

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?

Read, generate and modify configuration — This question tests Read, generate and modify configuration — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The AMI is not available in the region specified in the provider configuration. — Option B is correct because the error 'InvalidAMIID.NotFound' indicates that the specified AMI ID does not exist in the AWS region configured in the Terraform provider block. AMI IDs are region-specific; an AMI available in us-east-1 may not exist in eu-west-2. Terraform validates the AMI against the region's EC2 API, and if the ID is not found, it throws this exact error.

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

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.