Best Practices
Best practices for application deployment and maintenance of cloud infrastructures using IaC, Terraform / OpenTF, Ansible, Kubernetes & AWS.
Terraform & OpenTofu (10)
- Terraform & OpenTofu Tutorials
Estimate AWS Costs in Terraform Pull Requests with Infracost
How to see the monthly cost of Terraform and OpenTofu changes before applying them with Infracost, and how to keep AWS demo costs under control.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Testing: tofu test, validate and Terratest
How to test infrastructure code: terraform validate, the native terraform test and tofu test framework with mock providers, plan checks and Terratest.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Project Structure: Recommended Layouts
How to organize a Terraform or OpenTofu project: files, modules, environments, state splitting, versions and a monorepo layout that scales with the team.
- Terraform & OpenTofu Tutorials
Terraform Secrets Management: Keep Passwords Out of Code and State
How to handle secrets in Terraform and OpenTofu: sensitive variables, AWS Secrets Manager, SSM, generated passwords, ephemeral values and state encryption.
- Terraform & OpenTofu Tutorials
Terraform Workspaces vs Directories: How to Manage Environments
Compare Terraform and OpenTofu workspaces with separate directories and tfvars files to manage dev, pre and pro environments, and learn which one to use.
- Terraform & OpenTofu Tutorials
Terraform Security Scanning with tflint, Checkov and Trivy
Find misconfigurations in Terraform and OpenTofu code before deploying: tflint for errors, Checkov and Trivy for AWS security issues, with CI examples.
- Terraform Best Practices
Terraform and OpenTofu Best Practices for AWS and the Cloud
A practical checklist of Terraform and OpenTofu best practices: state, modules, versions, security, CI/CD, naming, testing and cost control.
- Terraform & OpenTofu Tutorials
How to Encrypt Terraform State with OpenTofu
Step-by-step guide to encrypting the Terraform state file with OpenTofu state encryption and AWS KMS, with a full configuration example.
- Terraform Best Practices
How to Share Infrastructure in Multiple Terraform Projects?
Sharing infrastructure across multiple Terraform projects using Data Sources helps maintain consistency, reduce redundancy, and promote collaboration.
- Terraform Best Practices
AWS and Terraform Naming Best Practices
Terraform and AWS resource naming should follow a company standard. Each company has different requirements and the standard should be adjusted.
AWS (3)
- AWS Best Practices
AWS Cost Optimization and FinOps: A Practical Checklist
How to reduce AWS costs: budgets, tagging, right-sizing, Savings Plans, NAT gateway and data transfer savings, storage lifecycle and automation with Terraform.
- AWS Best Practices
AWS Security Groups’ Best Practices
Best practices for AWS security groups, the virtual firewalls of EC2, RDS and other resources: naming, groups as sources, least privilege and rule descriptions.
- AWS Best Practices
AWS Tagging Best Practices
Effective infrastructure resource tagging can greatly improve management, IaC, monitoring and cost visibility in AWS.
Ansible (3)
- Ansible Best Practices
Ansible Multiple Environment Best Practices
Handling multiple infrastructure environments with Ansible by targeting the environment tag that is included in the mandatory AWS tags
- Ansible Best Practices
Ansible Roles Best Practices
How granular Ansible roles should be: highly reusable by configuration, but pragmatic for stateful applications that are not cloud native.
- Ansible Best Practices
Ansible Playbook Structure Best Practices
Define and apply a company-wide consistent structure for all your Ansible Playbooks that allows for easy understanding and maximum reuse