1. Security group rules control…
- CPU speed
- Network traffic in/out of instances
- S3 bucket names
- Terraform version
Source: doonops-curriculum/aws-compute--user-data.md
Doonops lesson
Bootstrap script that runs when server boots first time.
user_data = sticky note on new server: "install nginx, show hello page". templatefile() fills name dynamically.
user_data = sticky note on new server: "install nginx, show hello page". templatefile() fills name dynamically.
user_data = sticky note on new server: "install nginx, show hello page". templatefile() fills name dynamically.
Layman words first, then technical detail — read slowly
Runs as root/cloud-init at boot — great for demos; for production consider Ansible/SSM later.
Modern HCL — names are examples, not from any third-party course
# see project files
Terraform runs on your computer — copy this HCL into a folder, then follow the local lab steps below.
Full implementation folder — copy all files, then run terraform commands
Copy every file below into one folder — same as a real repo module. Then run the local lab steps.
Suggested folder: Suggested path: ~/doonops-terraform/12-user-data/
versions.tfSee file purpose in the code belowterraform {
required_version = ">= 1.9.0"
}
2–3 quick questions before the next module
Quick check — did this module stick?
1. Security group rules control…