Category Terraform

Terraform mono repo vs multi repo

Terraform structure is not folder organization. It defines how infrastructure is owned, governed, deployed, and scaled across teams and evironments. The goal is to make operational boundaries clear: who owns which part of infrastructure, where is the state stored, how…

Terraform Pre-Commit Setup

When working with Terraform it is good practice to catch simple issues as early as possible, before Ci/CD or PR review. For that reason, I usually add a .pre-commit-config.yml file to infrastructure repositories. The goal isn’t of course to replace…

Using Terraform lookup()

Terraform modules often need a balance between flexibility and simplicity. Sometimes you need a reusable module, but you do not want every caller to define whatever possible option. Some values should be optional, some should have defaults and some should…

GuardDuty Malware Protection for S3 with Terraform

User-uploaded files are a common security risk. If an application allows users to upload PDFs, images, or any documents into S3, those files should be scanned before they are trusted by downstream services. Instead of building a custom pipeline with…

image

Terraform: using existing VPC for private Lambdas

When working with a Terraform VPC Lambda setup, you will not always be creating AWS accounts and networking from scratch. In many projects, the client already has an AWS Landing Zone in place, with much of the foundational infrastructure and…

Building reusable SQS queues with Terraform

When working with asynchronous systems in AWS solutions usually include SQS without thinking too much about long-term architecture and structure. Regardless that SQS is generally easy to deploy and use when you start deploying multiple services and solution gets on…

Managing RDS snapshot restore with Terraform

Backup and restore strategies are something we usually configure it just in case anything bad happen but we never actually test it and try it out to see in more details how it works.In AWS environment when using RDS cluster…

AWS Cognito Setup with Terraform

Authentication in modern applications is an architectural boundary. It defines how users prove their identity, how applications obtain tokens, how APIs validate incoming requests, and how permissions are enforced across services. When authentication is configured manually in the AWS console…

Automating Cross-Region Backups in AWS with Terraform

When managing data heavy infrastructure at scale we often forget about backups as we are used to fact that cloud will not fail us until one day you actually need to restore it. Having a consistent, automated backup process across…