Category Terraform

Terraform Timeouts

Sometimes Terraform starts creating a resource, and the deployment spends several minutes showing: That does not necessarily mean something is broken, rather database creation, service updates, and cloud configuration changes can take time. The problem is we are not sure…

Terraform apply failed, but the AWS resource exists

magine you are restoring an Aurora database from an automated snapshot through a Terraform pipeline. The operation takes longer than expected, and the temporary STS credentials expire without being refreshed. AWS creates the database, but Terraform cannot save the updated…

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…