Infrastructure as Code Flashcards
6 cards from real DevOps practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Infrastructure as Code flashcards as text
What is Infrastructure as Code (IaC)?
Answer: Managing and provisioning infrastructure through machine-readable configuration files
IaC manages infrastructure (networks, VMs, load balancers) through declarative or imperative configuration files that can be version-controlled and automated.
Which IaC tool uses a declarative language called HCL (HashiCorp Configuration Language)?
Answer: Terraform
Terraform uses HCL to describe the desired state of infrastructure; it then creates, updates, or destroys resources to match that declared state.
What does `terraform init` do?
Answer: Initializes a Terraform working directory and downloads provider plugins
`terraform init` initializes the working directory by downloading the required provider plugins and setting up the backend for state storage.
What is Terraform 'state'?
Answer: A file that tracks the current real-world resources managed by Terraform
Terraform state (terraform.tfstate) maps the configuration to real infrastructure resources so Terraform can calculate changes and detect drift.
What is the purpose of `terraform plan`?
Answer: Shows what changes Terraform will make without actually applying them
`terraform plan` creates an execution plan showing which resources will be created, modified, or destroyed based on current state vs. desired configuration.
What is Ansible primarily used for in a DevOps workflow?
Answer: Configuration management and application deployment using agentless SSH
Ansible automates configuration management, application deployment, and orchestration using SSH without requiring agents on managed nodes.