Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← Understand IaC concepts practice sets

TF-003 Understand IaC concepts • Complete Question Bank

TF-003 Understand IaC concepts — All Questions With Answers

Complete TF-003 Understand IaC concepts question bank — all 0 questions with answers and detailed explanations.

52
Questions
Free
No signup
Certifications/TF-003/Practice Test/Understand IaC concepts/All Questions
Question 1mediummultiple choice
Read the full Understand IaC concepts explanation →

A team is adopting Terraform to manage infrastructure. One requirement is that all configuration changes must be reviewed and approved before being applied. The team wants to ensure that the Terraform state file reflects the actual deployed infrastructure at all times. Which practice should they implement to meet these requirements?

Question 2hardmultiple choice
Read the full Understand IaC concepts explanation →

An organization manages multiple environments (dev, staging, prod) using Terraform. They want to minimize code duplication while allowing environment-specific variable values. Which approach best achieves this goal?

Question 3easymultiple choice
Read the full Understand IaC concepts explanation →

A junior administrator wants to practice Terraform by deploying a single web server in AWS. They write a configuration file and run terraform init and terraform apply. The deployment succeeds but they notice the web server is not accessible from the internet. What is the most likely reason?

Question 4hardmultiple choice
Read the full Understand IaC concepts explanation →

A company uses Terraform to manage infrastructure on AWS. They have a configuration that creates an S3 bucket and a DynamoDB table for state locking. The team notices that sometimes when two members run terraform apply simultaneously, they get a state locking error. However, they want to allow concurrent operations on different workspaces. What is the best approach?

Question 5hardmulti select
Read the full Understand IaC concepts explanation →

Which THREE of the following are benefits of using Infrastructure as Code (IaC) compared to manual infrastructure management?

Question 6mediummultiple choice
Read the full Understand IaC concepts explanation →

You are a DevOps engineer at a growing startup. The infrastructure currently consists of a single AWS EC2 instance running a web application, manually configured. The company plans to scale to multiple instances and environments (development, staging, production). They want to adopt Infrastructure as Code using Terraform. The team has limited experience with Terraform and wants to start small, then gradually adopt more advanced features. The current manual infrastructure must be imported into Terraform. The team also wants to ensure that code changes are reviewed via pull requests before being applied. Which of the following is the best course of action to meet these requirements?

Question 7mediummulti select
Read the full Understand IaC concepts explanation →

Which TWO statements about Infrastructure as Code (IaC) are correct?

Question 8hardmultiple choice
Read the full Understand IaC concepts explanation →

A developer runs terraform apply with the configuration above. The resource is created successfully, but the provisioner fails because the public_ip attribute is not yet known at plan time. What is the most likely cause?

Exhibit

Refer to the exhibit.

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

  provisioner "local-exec" {
    command = "echo ${aws_instance.web.public_ip} > ip.txt"
  }
}
```
Question 9easymultiple choice
Read the full Understand IaC concepts explanation →

You are a platform engineer at a growing startup. The company currently manages infrastructure manually by SSH-ing into servers to install packages and update configurations. As the team grows, this approach has led to frequent configuration drift, inconsistent environments, and manual errors. Deploying a new environment takes several days and requires detailed runbooks. The CTO has asked you to propose a solution that improves consistency, reduces deployment time, and enables version control of infrastructure. You are evaluating Infrastructure as Code (IaC) tools like Terraform. Which course of action best addresses the CTO's requirements?

Question 10mediummulti select
Read the full Understand IaC concepts explanation →

Which three statements correctly describe concepts of Infrastructure as Code (IaC) as implemented by Terraform? (Choose three.)

Question 11mediummulti select
Read the full Understand IaC concepts explanation →

Which of the following are key benefits of using Infrastructure as Code (IaC) compared to manual infrastructure management? (Choose four.)

Question 12mediumdrag order
Read the full Understand IaC concepts explanation →

Drag and drop the steps to initialize a Terraform working directory in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 13mediumdrag order
Read the full Understand IaC concepts explanation →

Drag and drop the steps to upgrade Terraform providers in a configuration in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 14mediummatching
Read the full Understand IaC concepts explanation →

Match each Terraform command to its primary function.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Initialize a working directory with provider plugins

Create an execution plan

Execute the actions proposed in a plan

Destroy previously-created infrastructure

Check configuration for syntax and internal consistency

Question 15mediummatching
Read the full Understand IaC concepts explanation →

Match each Terraform cloud/enterprise feature to its purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Organize state and runs for different environments

Integrate third-party policy or compliance checks

Policy as code framework for governance

Store state securely in Terraform Cloud

Trigger runs automatically from version control

Question 16easymultiple choice
Read the full Understand IaC concepts explanation →

An organization wants to ensure that running the same Terraform configuration multiple times produces the same result without unintended changes. Which IaC concept is most critical for this goal?

Question 17easymultiple choice
Read the full Ansible explanation →

A team is evaluating Terraform and Ansible for infrastructure provisioning. They note that Terraform describes the desired end state, while Ansible defines steps to reach that state. This difference is best described as:

Question 18hardmultiple choice
Read the full Understand IaC concepts explanation →

A team of five engineers uses Terraform with a remote backend in AWS S3 with DynamoDB state locking. One engineer runs 'terraform apply' but it hangs at 'Acquiring state lock'. What is the most likely cause?

Question 19hardmultiple choice
Read the full Understand IaC concepts explanation →

A user runs 'terraform plan' and gets an error: 'No state file was found!'. Which is the most likely cause?

Question 20mediummultiple choice
Review the full subnetting walkthrough →

A company has a Terraform module that creates an AWS VPC with subnets. They want to reuse this module across multiple AWS accounts. What is the best practice for referencing the module from different root configurations?

Question 21mediummultiple choice
Read the full Understand IaC concepts explanation →

During development, a Terraform user wants to check that their configuration is syntactically valid and internally consistent before running 'terraform plan'. Which command should they use?

Question 22hardmultiple choice
Read the full Understand IaC concepts explanation →

A Terraform configuration includes a variable for a database password marked as sensitive. When a user runs 'terraform apply', the password appears as (sensitive) in the plan output. However, they want to pass this password to a provisioner as an environment variable. What should they do?

Question 23easymultiple choice
Read the full Understand IaC concepts explanation →

A Terraform user wants to visualize the execution order of resources before applying changes. Which command provides a dependency graph view?

Question 24mediummultiple choice
Read the full Understand IaC concepts explanation →

A team uses Terraform to manage multiple AWS EC2 instances with a 'count' meta-argument. They need to reference the ID of the third instance in another resource's configuration. Which expression should they use?

Question 25hardmultiple choice
Read the full Understand IaC concepts explanation →

An organization uses Terraform Cloud with VCS-driven runs. They have two workspaces: network and application. They want a new run in the application workspace to automatically trigger whenever the network workspace completes a successful plan. What should they configure?

Question 26mediummulti select
Read the full Understand IaC concepts explanation →

Which two are primary benefits of using Infrastructure as Code (IaC) with Terraform?

Question 27hardmulti select
Read the full Understand IaC concepts explanation →

Which three characteristics are associated with immutable infrastructure as practiced by Terraform?

Question 28easymulti select
Read the full Understand IaC concepts explanation →

Which two commands are part of the standard Terraform workflow for provisioning infrastructure?

Question 29mediummultiple choice
Read the full Understand IaC concepts explanation →

Based on the exhibit, what can be inferred about the Terraform state and configuration?

Exhibit

# terraform plan output
Terraform will perform the following actions:

  # aws_instance.web will be created
  + resource "aws_instance" "web" {
      + ami           = "ami-0c55b159cbfafe1f0"
      + instance_type = "t2.micro"
      + tags          = {
          + "Name" = "WebServer"
        }
    }

  # aws_instance.db will be destroyed
  - resource "aws_instance" "db" {
      - ami           = "ami-0c55b159cbfafe1f0" -> null
      - instance_type = "t2.micro" -> null
    }
Plan: 1 to add, 0 to change, 1 to destroy.
Question 30hardmultiple choice
Read the full Understand IaC concepts explanation →

After applying the configuration above, the user changes the AMI to a new value and runs 'terraform apply'. Assuming the new AMI triggers a recreate, what happens during the apply?

Exhibit

resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
  tags = {
    Name = "WebServer"
  }
  lifecycle {
    create_before_destroy = true
  }
}
Question 31easymultiple choice
Read the full Understand IaC concepts explanation →

A team uses the backend configuration above. What is the primary benefit of storing state remotely in S3?

Exhibit

# backend.tf
terraform {
  backend "s3" {
    bucket = "my-terraform-state"
    key    = "prod/terraform.tfstate"
    region = "us-east-1"
  }
}
Question 32easymultiple choice
Read the full Understand IaC concepts explanation →

A team wants to ensure that their infrastructure configuration repeatedly results in the same environment regardless of the initial state. Which IaC concept is most directly associated with this goal?

Question 33mediummultiple choice
Read the full Understand IaC concepts explanation →

A development team is using a declarative IaC tool. They make a change to the configuration file to add a new security group rule. When they apply the configuration, the tool automatically modifies the existing security group to add the rule. What is this behavior called?

Question 34hardmultiple choice
Read the full Understand IaC concepts explanation →

An organization is evaluating IaC tools and wants to minimize configuration drift. Which characteristic of a declarative IaC approach is most effective in preventing drift?

Question 35easymultiple choice
Read the full Understand IaC concepts explanation →

Which of the following is a primary benefit of using Infrastructure as Code?

Question 36mediummultiple choice
Read the full Understand IaC concepts explanation →

A company is managing multiple cloud environments (dev, test, prod) using Terraform. They want to ensure consistent configurations across environments while allowing environment-specific values. Which IaC practice best supports this?

Question 37mediummultiple choice
Read the full Understand IaC concepts explanation →

A team uses Terraform to manage AWS resources. After a manual change to an S3 bucket policy through the AWS console, Terraform's next plan shows that it will revert the policy to the configuration. This is an example of which concept?

Question 38easymultiple choice
Read the full Understand IaC concepts explanation →

Which statement best describes 'immutable infrastructure' in the context of IaC?

Question 39easymultiple choice
Read the full Understand IaC concepts explanation →

A company uses Terraform to deploy virtual machines. They want to ensure that the same exact operating system and software versions are used every time. Which practice supports this?

Question 40hardmultiple choice
Read the full Understand IaC concepts explanation →

In Terraform, the `terraform plan` command compares the current state with the configuration. This is an example of which IaC principle?

Question 41easymulti select
Read the full Understand IaC concepts explanation →

Which two are benefits of using Infrastructure as Code? (Choose two.)

Question 42mediummulti select
Read the full Understand IaC concepts explanation →

Which three practices help maintain consistency and reduce configuration drift in IaC? (Choose three.)

Question 43hardmulti select
Read the full Understand IaC concepts explanation →

Which two statements accurately describe the difference between declarative and imperative IaC approaches? (Choose two.)

Question 44mediummultiple choice
Read the full Understand IaC concepts explanation →

Refer to the exhibit. A team is using this S3 backend configuration. During a deployment, they receive an error that the state file is locked. What is the most likely cause?

Exhibit

terraform {
  backend "s3" {
    bucket = "mycompany-terraform-state"
    key    = "prod/terraform.tfstate"
    region = "us-east-1"
    dynamodb_table = "terraform-state-lock"
  }
}
Question 45hardmultiple choice
Read the full Understand IaC concepts explanation →

Refer to the exhibit. After applying this configuration, a team member manually changes the instance type to 't2.small' via the AWS console. The next `terraform plan` shows a change to revert to 't2.micro'. What does this demonstrate?

Exhibit

resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
  tags = {
    Name = "WebServer"
  }
}
Question 46hardmultiple choice
Read the full Understand IaC concepts explanation →

A company manages a microservices application across multiple AWS accounts using Terraform. They have a dedicated 'infrastructure' repository with Terraform configurations for each account. The team recently migrated their Terraform state to a centralized S3 backend with DynamoDB locking. After the migration, they notice that when two developers run `terraform apply` simultaneously in the same workspace, one of them receives a lock error, but the other proceeds normally. The team wants to ensure that only one apply runs at a time across all workspaces. However, they also need to allow concurrent operations on different workspaces. The current backend configuration uses a single DynamoDB table for all workspaces. What should the team do to achieve their goals?

Question 47mediummultiple choice
Read the full Understand IaC concepts explanation →

A startup is adopting Terraform to manage their cloud infrastructure. They want to ensure that changes to infrastructure are reviewed and approved before being applied. Which practice aligns with Infrastructure as Code principles to achieve this?

Question 48easymulti select
Read the full Understand IaC concepts explanation →

A team is defining their Infrastructure as Code strategy. Which two of the following are key benefits of using IaC compared to manual configuration?

Question 49easymultiple choice
Read the full Understand IaC concepts explanation →

A company manages multiple AWS accounts using Terraform. They have a central repository where all Terraform configurations are stored. Recently, a developer accidentally ran terraform destroy on a production workspace and deleted critical resources. The team wants to implement safeguards to prevent such incidents while still allowing developers to test changes in non-production environments. They currently use Terraform Cloud for remote state management and runs. Which course of action should the team take to minimize risk?

Question 50easymulti select
Read the full Understand IaC concepts explanation →

Which TWO statements correctly describe Infrastructure as Code principles?

Question 51mediummultiple choice
Read the full Understand IaC concepts explanation →

Refer to the exhibit. What will happen when you run terraform plan?

Exhibit

resource "aws_iam_user" "example" {
  path = "/system/"
}
Question 52hardmultiple choice
Read the full Understand IaC concepts explanation →

A team manages a multi-tier application consisting of web servers, application servers, and databases deployed across AWS and Azure. Historically, they have provisioned infrastructure manually using cloud consoles and ad-hoc scripts. To improve consistency and reduce errors, they decide to adopt Terraform for Infrastructure as Code. After initial rollout, they encounter problems: some team members still make direct changes via the cloud console to quickly fix issues, causing configuration drift between the Terraform state and actual resources. They also need to manage three distinct environments (development, staging, production) with different configurations (e.g., instance sizes, database settings). The team consists of five people with a limited budget for additional tools. Which course of action best addresses these challenges while adhering to IaC principles?

Practice tests

Scored 10-question sessions with instant feedback and explanations.

TF-003 Practice Test 1 — 10 Questions→TF-003 Practice Test 2 — 10 Questions→TF-003 Practice Test 3 — 10 Questions→TF-003 Practice Test 4 — 10 Questions→TF-003 Practice Test 5 — 10 Questions→TF-003 Practice Exam 1 — 20 Questions→TF-003 Practice Exam 2 — 20 Questions→TF-003 Practice Exam 3 — 20 Questions→TF-003 Practice Exam 4 — 20 Questions→Free TF-003 Practice Test 1 — 30 Questions→Free TF-003 Practice Test 2 — 30 Questions→Free TF-003 Practice Test 3 — 30 Questions→TF-003 Practice Questions 1 — 50 Questions→TF-003 Practice Questions 2 — 50 Questions→TF-003 Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

Understand IaC conceptsUnderstand Terraform basicsUnderstand Terraform's purposeUse Terraform outside the core workflowInteract with Terraform modulesUse the core Terraform workflowImplement and maintain stateRead, generate and modify configuration

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All Understand IaC concepts setsAll Understand IaC concepts questionsTF-003 Practice Hub