General DevOps Intermediate Infrastructure as Code Basics Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Questions: 20 | Updated: Aug 14, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. In CloudFormation, what is a template?

Explanation

A CloudFormation template is a JSON or YAML document that defines the AWS resources to create and how they’re configured. CloudFormation uses the template to provision and manage those resources as a stack.

Submit
Please wait...
About This Quiz
General DevOps Intermediate Infrastructure As Code Basics Quiz - Quiz

Test your understanding of Infrastructure as Code (IaC) principles and practices in DevOps environments. This quiz covers declarative vs. imperative approaches, popular IaC tools, configuration management, version control integration, and best practices for managing infrastructure programmatically. Ideal for DevOps practitioners and cloud engineers seeking to strengthen foundational IaC knowledge.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. The ____ file in Terraform stores information about deployed infrastructure.

Explanation

Terraform’s state file records the resources managed by a configuration, along with their current attributes and identifiers. It maps Terraform configuration to real infrastructure, helping Terraform detect changes and determine which actions are needed when planning and applying updates.

Submit

3. Puppet and Chef are examples of ____ management tools.

Explanation

Puppet and Chef automate the setup and maintenance of computers and servers. They help define desired system settings, apply configurations consistently across many machines, and manage changes over time—functions associated with configuration management tools.

Submit

4. Infrastructure as Code reduces manual errors by automating ____.

Explanation

Infrastructure as Code uses scripts and configuration files to automate the setup and management of infrastructure. Automating provisioning helps ensure resources are created consistently and repeatably, reducing mistakes that can occur when people configure servers, networks, and other components manually.

Submit

5. Which approach allows you to specify commands to run in a specific order?

Explanation

Imperative programming defines a sequence of explicit commands that the system executes in the order specified. This lets you control each step of a process directly.

Submit

6. What is a module in Terraform?

Explanation

A Terraform module is a reusable collection of configuration files that defines related infrastructure resources. Modules help organize code, avoid repetition, and make configurations easier to maintain and share across projects or environments. A module can call other modules and accept input variables to customize the resources it creates.

Submit

7. In IaC, what does 'immutable infrastructure' mean?

Explanation

Immutable infrastructure means that once a server is deployed, it is not modified in place. When changes are needed, a new server is created with the updated configuration, and the old server is replaced. This helps keep environments consistent and deployments predictable.

Submit

8. Which statement about Ansible is true?

Explanation

Ansible typically connects to managed Linux systems over SSH without requiring an agent to be installed on each target. This agentless design simplifies deployment and maintenance while allowing Ansible to automate configuration and infrastructure tasks.

Submit

9. What does DRY stand for in IaC best practices?

Explanation

DRY stands for “Don’t Repeat Yourself.” In Infrastructure as Code, it means avoiding duplicated configuration by using reusable modules, templates, or variables, making infrastructure easier to maintain and update consistently.

Submit

10. Which IaC practice involves storing sensitive data like API keys securely?

Explanation

Secrets management is the IaC practice of securely storing, accessing, and rotating sensitive information such as API keys, passwords, and tokens. It helps prevent these credentials from being exposed in configuration files or version-control repositories and allows authorized systems to retrieve them when needed.

Submit

11. What is the primary advantage of Infrastructure as Code (IaC) in DevOps?

Explanation

Infrastructure as Code defines infrastructure through machine-readable files, allowing teams to track changes in version control and recreate consistent environments. This improves collaboration, auditability, and reliability across development, testing, and production.

Submit

12. What is the purpose of a Terraform state file?

Explanation

A Terraform state file records the resources Terraform manages and their current attributes, linking configuration to real infrastructure. Terraform uses this information to compare the desired setup with the existing environment, determine what changes are needed, and apply updates without recreating or modifying resources unnecessarily.

Submit

13. Which of these is NOT a primary IaC tool or framework?

Explanation

Puppet, Chef, and SaltStack are configuration-management tools used to automate infrastructure setup and maintenance. Nginx, by contrast, is a web server and reverse proxy. Although it can be configured through automation, it is not itself a primary infrastructure-as-code tool or framework.

Submit

14. What does idempotency mean in the context of IaC?

Explanation

Idempotency means applying the same infrastructure configuration repeatedly leaves the system in the same desired state. Once the configuration has been applied, running it again won’t create unintended duplicate resources or additional changes.

Submit

15. In Terraform, what file extension is used for variable definitions?

Explanation

Terraform variable values are commonly stored in files ending in `.tfvars`. Terraform automatically loads files named `terraform.tfvars` or `*.auto.tfvars`; other `.tfvars` files can be loaded explicitly with the `-var-file` option.

Submit

16. CloudFormation and Terraform both support which cloud platform?

Explanation

Terraform supports resources across multiple cloud providers, while CloudFormation can manage AWS resources and, through extensions and third-party resource providers, can also interact with services outside AWS. Together, they can be used in multi-cloud environments, though Terraform offers broader, more direct multi-cloud support.

Submit

17. What is a key benefit of storing IaC files in version control systems like Git?

Explanation

Storing Infrastructure as Code (IaC) files in Git records changes over time, including who made them and when. This creates an audit trail for reviewing and tracking infrastructure updates. If a change causes problems, teams can compare versions and roll back to a previously working configuration.

Submit

18. Which tool is primarily used for configuration management after infrastructure is provisioned?

Explanation

Ansible is commonly used to configure servers and applications after infrastructure has been provisioned. It automates tasks such as installing software, managing services, and applying consistent settings across multiple machines. CloudFormation provisions AWS resources, while Kubernetes and Docker focus on container orchestration and packaging, respectively.

Submit

19. Terraform is an example of which type of IaC tool?

Explanation

Terraform is an infrastructure provisioning tool. It uses configuration files to define and manage cloud and on-premises resources, such as servers, networks, and databases, enabling infrastructure to be created, changed, and tracked consistently.

Submit

20. Which approach defines infrastructure by specifying the desired final state?

Explanation

Declarative IaC describes the desired end state of infrastructure, such as the required servers, networks, and settings. The provisioning tool determines and performs the steps needed to reach that state, rather than requiring instructions for each individual action. This makes configurations easier to maintain and helps ensure consistent deployments.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
In CloudFormation, what is a template?
The ____ file in Terraform stores information about deployed...
Puppet and Chef are examples of ____ management tools.
Infrastructure as Code reduces manual errors by automating ____.
Which approach allows you to specify commands to run in a specific...
What is a module in Terraform?
In IaC, what does 'immutable infrastructure' mean?
Which statement about Ansible is true?
What does DRY stand for in IaC best practices?
Which IaC practice involves storing sensitive data like API keys...
What is the primary advantage of Infrastructure as Code (IaC) in...
What is the purpose of a Terraform state file?
Which of these is NOT a primary IaC tool or framework?
What does idempotency mean in the context of IaC?
In Terraform, what file extension is used for variable definitions?
CloudFormation and Terraform both support which cloud platform?
What is a key benefit of storing IaC files in version control systems...
Which tool is primarily used for configuration management after...
Terraform is an example of which type of IaC tool?
Which approach defines infrastructure by specifying the desired final...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!