Testing Terraform AWS Modules in Drone CI Pipelines with Localstack
summary
Shows how running Terraform module tests inside Drone CI against LocalStack replaces real AWS for an AWS networking module (VPC, public/private subnets, NAT gateway, EIP), using both the experimental Terraform test command and Terratest (Go). LocalStack runs tests in about 40 seconds vs highly variable real-AWS runs measured across seven runs, demonstrates a deliberate failing tag assertion, and confirms Terraform apply/destroy happens against LocalStack while Terratest prints verbose apply output and terraform test reports concise failures.
AI-written summary · about
chapters (5)
related talks
10m“Test Fast. Test Local. Test AWS.”
52mTest Driven Delivery of Infrastructure-As-Code
35mTesting in Infrastructure as Code
26mTesting Infrastructure as Code Using OpenTofu and Localstack
17mTDD for Infrastructure Code
23mCloud Integration Testing Made Easy for AWS Cloud Apps
48mTesting Cloud-Native Applications With Ease!
29mTesting Your HCL Modules for Terraform
