โ† All SRE Flashcard Decks

Automation Tools & Infrastructure as Code Flashcards

7 cards from real SRE practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Automation Tools & Infrastructure as Code flashcards as text
  1. What does 'immutable infrastructure' mean in SRE practice?

    Answer: Servers are replaced rather than updated when changes are needed

    Immutable infrastructure means that once deployed, servers are never modified in place; instead they are replaced with new instances containing the updates.

  2. Which Terraform resource type allows you to run arbitrary scripts during provisioning?

    Answer: null_resource with provisioner

    A `null_resource` with a `provisioner` block (local-exec or remote-exec) allows running arbitrary scripts as part of Terraform provisioning.

  3. In Ansible, what is the difference between a 'task' and a 'role'?

    Answer: A role is a reusable collection of tasks, variables, and handlers organized in a standard structure

    An Ansible role packages related tasks, handlers, variables, and files into a reusable, shareable unit with a standardized directory structure.

  4. What problem does remote Terraform state storage (e.g., S3 + DynamoDB) solve?

    Answer: It enables team collaboration and prevents concurrent state modifications

    Remote state storage enables multiple team members to share state and uses locking (e.g., DynamoDB) to prevent simultaneous conflicting changes.

  5. Which testing approach validates that Terraform modules produce the expected infrastructure?

    Answer: Integration testing with tools like Terratest

    Terratest is a Go library that enables integration testing of Terraform modules by actually deploying infrastructure and validating its behavior.

  6. What is the purpose of Ansible 'handlers'?

    Answer: They are tasks triggered only when notified by other tasks

    Handlers are special tasks that only run when notified by other tasks, typically used for actions like restarting a service after a configuration change.

  7. In the context of SRE and IaC, what is a 'golden image'?

    Answer: A pre-built, pre-configured machine image used as a base for new instances

    A golden image is a vetted, pre-configured machine image that serves as a standardized starting point for deploying new servers, reducing configuration time.