nerdexam
HashiCorp

TA-002-P · Question #411

Which are examples of infrastructure as code? (Choose two.)

The correct answer is C. Versioned configuration files D. Docker files. Infrastructure as Code (IaC) refers to machine-readable, version-controlled files that define infrastructure - Dockerfiles and versioned configuration files fit this definition, while VM images and CMDB records do not.

Understand infrastructure as code (IaC) concepts

Question

Which are examples of infrastructure as code? (Choose two.)

Options

  • ACloned virtual machine images
  • BChange management database records
  • CVersioned configuration files
  • DDocker files

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    94% (30)

Why each option

Infrastructure as Code (IaC) refers to machine-readable, version-controlled files that define infrastructure - Dockerfiles and versioned configuration files fit this definition, while VM images and CMDB records do not.

ACloned virtual machine images

Cloned VM images are binary artifacts, not code; they cannot be easily versioned, reviewed, or diffed in the way IaC requires.

BChange management database records

Change management database records are documentation and audit trails, not executable or declarative code that provisions infrastructure.

CVersioned configuration filesCorrect

Versioned configuration files (such as Terraform .tf files or Ansible playbooks) are the canonical example of IaC - they are human-readable, diff-able, and stored in version control.

DDocker filesCorrect

A Dockerfile is a declarative, text-based file that defines a container image build process, satisfying the IaC requirement of being version-controlled and reproducible code.

Concept tested: Infrastructure as Code definition and examples

Source: https://developer.hashicorp.com/terraform/intro/infrastructure-as-code

Topics

#Infrastructure as Code#IaC examples#Configuration files#Docker

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice