~/talk

Testing Your HCL Modules for Terraform

Talkat HashiTalks 2021 · 2021-02-17..02-18· [devops-and-delivery, testing]
links:none on file
slides:none on file

Describes an automated way to unit test HCL by moving logic into locals, loading YAML with yamldecode, and feeding processed maps through Terraform’s external data source into a small Python test fixture that prints pass/fail; an example run shows four unit tests passed. Tests live in a test dir that symlinks real locals files, run terraform init/apply, and are automated with GitHub Actions. Integration jobs create transient GCP projects, push an image, deploy to GKE, Cloud Run and App Engine, then destroy.

AI-written summary · about

  1. 0:00Introduction and backstory
  2. 2:16The need for testing
  3. 3:40Testing concepts
  4. 5:09Benefits of testing
  5. 7:01Testing approaches
  6. 8:58Implementing unit tests
  7. 10:45YAML configuration
  8. 12:32Test execution
  9. 16:00Automating unit tests
  10. 19:47Integration testing
  11. 23:24Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.