Cloudwithdj
11/12/2025
Happy Veterans Day.
Salute to those who have served,
and gratitude to those who continue to support our veterans.
- Hard Charger P.O.
US Navy veteran.
How to avoid writing bad Terraform code?
Terraform is powerful, but if your code isn’t clean, your infrastructure won’t be either.
Here are 4 best practices I follow to keep my Terraform projects clean and scalable:
1. DRY principle
- Don’t repeat yourself.
- Use variables and modules instead of copy-pasting resources.
2. Consistent naming and tagging
- Clear naming and proper tags make management, reporting, and troubleshooting easier.
3. Organized file structure
- Separate files like main.tf, variables.tf, and outputs.tf to keep things clear and manageable.
4. Cost awareness
- Build with budget in mind.
- Use tagging, right-size resources and clean up anything you’re no longer using.
Clean Terraform code isn’t just about neat files, it’s about creating reliable, scalable infrastructure your team can trust.
What’s one Terraform practice you always follow?
09/04/2025
As a Cloud or DevOps engineer, you’ll often work on smaller but critical tasks like creating and connecting a database server, setting up a security group, or running a bootstrap script on a web server when using Terraform.
For beginners, these tasks are great practice because they reflect what you’ll do in enterprise environments.
I created a step-by-step tutorial to walk you through one of these tasks:
Using Terraform To Deploy a Web Server and Run a Bootstrap Script – Cloud with DJ Terraform isn’t just for big, end-to-end projects. As a Cloud or DevOps engineer, you’ll often work on smaller but critical tasks like creating and connecting a database server, setting up a security group, or running a bootstrap script on a web server.
Click here to claim your Sponsored Listing.
Contact the school
Telephone
Website
Address
Houston, TX
77064