Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

HashiCorp Terraform Associate (004)

Build infrastructure as code: providers, the plan/apply workflow, variables and modules, state, import and HCP Terraform — with a real Azure project. Phase 3 of my path.

Course by
HashiCorp
Course code
Terraform Associate 004
Version
Terraform 1.12
Lessons
65

These summaries follow the public outline of the course. I wrote every lesson in my own words and tested the commands on RHEL 10. They are not Red Hat training material. Take the official course for the full content and the hands-on labs.

Next course: Git

Parts and chapters

Part 1

Basics and workflow

  1. 1Understand Infrastructure as Code and TerraformObjective 1: Infrastructure as Code (IaC) with Terraform5 lessons
    Lessons
    1. 1.1 Know what IaC is
    2. 1.2 Know the advantages of IaC
    3. 1.3 See how Terraform works with many platforms
    4. 1.4 Compare Terraform with other tools
    5. 1.5 Install Terraform
  2. 2Install and use providers, and understand stateObjective 2: Terraform fundamentals5 lessons
    Lessons
    1. 2.1 Install and pin providers
    2. 2.2 Know how Terraform uses providers
    3. 2.3 Use several providers and aliases
    4. 2.4 Log in providers safely
    5. 2.5 Understand state
  3. 3Use the core workflow from init to destroyObjective 3: Core Terraform workflow7 lessons
    Lessons
    1. 3.1 Know the workflow
    2. 3.2 Initialise a working directory
    3. 3.3 Validate and format
    4. 3.4 Plan the changes
    5. 3.5 Apply the changes
    6. 3.6 Destroy infrastructure
    7. 3.7 Use the CLI helpers

Part 2

Write configuration

  1. 4Write resources, data sources, variables and outputsObjective 4a–4c: resources, references, variables and outputs6 lessons
    Lessons
    1. 4.1 Use resource and data blocks
    2. 4.2 Reference attributes across resources
    3. 4.3 Declare input variables
    4. 4.4 Give values to variables
    5. 4.5 Return values with outputs
    6. 4.6 Name repeated values with locals
  2. 5Use complex types, expressions and functionsObjective 4d–4e: complex types, expressions and functions5 lessons
    Lessons
    1. 5.1 Use complex types
    2. 5.2 Create many resources with count and for_each
    3. 5.3 Write expressions
    4. 5.4 Use built-in functions
    5. 5.5 Generate nested blocks with dynamic
  3. 6Control order, lifecycle and custom conditionsObjective 4f–4g: dependencies and custom conditions4 lessons
    Lessons
    1. 6.1 Know implicit dependencies
    2. 6.2 Add explicit dependencies
    3. 6.3 Change behaviour with lifecycle
    4. 6.4 Check values with custom conditions
  4. 7Handle sensitive data and secretsObjective 4h: sensitive data and secrets management with Vault5 lessons
    Lessons
    1. 7.1 Mark values as sensitive
    2. 7.2 Keep secrets out of code
    3. 7.3 Read secrets from Vault
    4. 7.4 Protect the state
    5. 7.5 Scan the code for security problems

Part 3

Modules and state

  1. 8Reuse code with modulesObjective 5: Terraform modules5 lessons
    Lessons
    1. 8.1 Know where modules come from
    2. 8.2 Call a module
    3. 8.3 Write a module
    4. 8.4 Understand variable scope
    5. 8.5 Pin module versions
  2. 9Manage state, backends, locking and driftObjective 6: Terraform state management5 lessons
    Lessons
    1. 9.1 Know the local backend
    2. 9.2 Use a remote backend
    3. 9.3 Know state locking
    4. 9.4 Find and fix drift
    5. 9.5 Read the state safely
  3. 10Import, refactor and debug existing infrastructureObjective 7: Maintain infrastructure with Terraform4 lessons
    Lessons
    1. 10.1 Import existing resources
    2. 10.2 Inspect the state with the CLI
    3. 10.3 Refactor with moved and removed blocks
    4. 10.4 Turn on verbose logging

Part 4

HCP Terraform and a real project

  1. 11Run Terraform in HCP TerraformObjective 8: HCP Terraform5 lessons
    Lessons
    1. 11.1 Connect a configuration to HCP Terraform
    2. 11.2 Organise workspaces and projects
    3. 11.3 Choose a run workflow
    4. 11.4 Use the collaboration and governance features
    5. 11.5 Integrate with other tools
  2. 12Build a staging environment on Azure with TerraformHands-on project5 lessons
    Lessons
    1. 12.1 Lay out the repository
    2. 12.2 Build the state backend first
    3. 12.3 Write the staging environment
    4. 12.4 Add the pipeline
    5. 12.5 Prove that it works

Part 5

Review

  1. 13Review Terraform and get ready for the examExam preparation4 lessons
    Lessons
    1. 13.1 Workflow and fundamentals
    2. 13.2 Configuration
    3. 13.3 Modules, state and maintenance
    4. 13.4 Plan the exam day

What you learn

The main skills of the course and the chapter where you learn each one.

1–3: IaC, fundamentals and the core workflow

4: Terraform configuration

5–7: Modules, state and maintenance

8: HCP Terraform