Project 02 — Variables, Outputs and tfvars

Guided practice15 min
Duration
45 to 60 minutes · Module 2 — Variables, outputs and first AWS resource
You will build
a parameterizable Terraform project: variables are declared in variables.tf, their values come from terraform.tfvars (or from a file passed with -var-file), and the result is a local file whose name and content change without you touching main.tf
Deliverable
the project folder with its six .tf/.tfvars files, the outputs of plan, apply, output, and the proof that terraform destroy removed everything
Cost
none — local provider only, no cloud account.
How to read this page
click each "Show …" to open a section, and read them in the order they appear. Open a single appendix: Appendix A if you are on Windows, Appendix B if you are on Linux, macOS, WSL 2 or Git Bash. Appendix C is shared by both.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Variables, Outputs and First AWS Resource” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one