Search
Lessons (14)
- HCL, Resource Addresses, and Project Layout
… An argument assigns an expression to a name. hcl resource "local file" "notes" { filename = "${path.module}/notes.txt …
- Production Capstone and Interview Practice
… Define typed variables and use the environment and owner in tags. hcl modules/private-storage/variables.tf variable …
- Reusable Modules and Clear Interfaces
… outputs.tf : hcl output "filename" { value = local file.config.filename } In the root main.tf : hcl terraform { required …
- Testing, Preconditions, and Policy Checks
… Create tests/service.tftest.hcl : hcl run "api filename contract" { command = plan assert { condition = endswith(output.api config …
- Imports, Moved Blocks, and Safe Refactoring
… In an AWS-configured root, write matching resource configuration and an import block: hcl resource "aws s3 bucket …
- Variables, Locals, Outputs, and Validation
… Retain its terraform block, replace the original resource and output, and add: hcl variable "project" { type = string description …
- Count, for_each, Functions, and Stable Identities
… Those identifiers become part of the state address. hcl Keep the local provider configuration from lesson 2. variable …
- Dependencies, Data Sources, and Resource Lifecycle
… A reference tells it both which value to use and what must exist first: hcl resource "aws vpc …
- Your First Terraform Project
… This is a minimum for the examples, not a claim about the newest release. Create main.tf hcl …
- Environments, Workspaces, and Multiple Accounts
… Pass aliases explicitly when a module should use one: hcl Assume ./modules/private-storage declares hashicorp/aws as …
- State, Remote Backends, and Locking
… In the application root: hcl terraform { backend "s3" { bucket = "replace-with-your-existing-state-bucket" key = "academy/dev …
- Providers and Your First AWS Resources
… complete private bucket example Save as main.tf : hcl terraform { required version = " = 1.11, < 2.0" required providers …
- Terraform: Start Here
… understand the workflow, run a local lab, learn HCL and inputs, then create private AWS storage. 2. Intermediate …
- Secrets, Ephemeral Values, and Least Privilege
… In a supporting configuration: hcl variable "session token" { type = string sensitive = true ephemeral = true } This value must be …