Testing Terraform Modules in Local and CI Environments with LocalStack

Terraform 1.6 introduced native Terraform tests, but running them against real cloud resources leads to long deployment times and unnecessary costs. With LocalStack's Terraform integration (tflocal), you can validate configurations locally while closely emulating real cloud behaviour. By combining Terraform tests with LocalStack, developers can run integration tests in CI/CD environments, test event-driven serverless workflows, and establish a rapid feedback loop for cloud development.In this presentation, Harsh Mishra provides a hands-on demo of Terraform testing with LocalStack, exploring how to configure tests, validate infrastructure locally, and reduce costs and complexity while improving confidence in deployments.## Resources- Blog: https://blog.localstack.cloud/efficient-infrastructure-testing-localstack-terraform-tests-framework/- Documentation: https://developer.hashicorp.com/terraform/language/tests- tflocal: https://docs.localstack.cloud/user-guide/integrations/terraform/#tflocal-wrapper-script

Related Talks

Getting started with the LocalStack Dagger module

Looking to bring AWS emulation directly into your CI/CD pipelines? This hands-on session with Harsh Mishra shows you how to integrate LocalStack with Dagger to level up your development workflows.In this session, you'll learn how to:- Run full AWS emulation locally inside Dagger pipelines- Spin up LocalStack as a service using Dagger’s composable syntax- Use Cloud Pods for persistent state across pipeline runs- Create ephemeral environments for fast, clean, isolated testingKeep your cloud workflows repeatable, testable, and fastWhether you’re building serverless apps, managing infrastructure-as-code, or optimizing your DevOps pipelines, this talk will help you bring LocalStack into the heart of your CI/CD setup.

Learn More
Learn More
Getting started with LocalStack's Extension for Docker Desktop

LocalStack's Docker Extension allows developers to manage and run cloud applications locally within Docker Desktop efficiently. With a fully-integrated experience with features such as configuration profiles, container logs, and more, developers can now easily manage their LocalStack instance.In this video, Harsh from LocalStack discusses the LocalStack Docker Extension and how you can capitalize on an intuitive user experience to manage your LocalStack image, configuration profiles, and container logs directly within the Docker Desktop.

Learn More
Learn More
From Local to Production: The CI/CD Flow That Doesn't Suck

This is where it all comes together.CI/CD lets dev teams ship code automatically — but only if your pipeline is built to handle the cloud.In this episode, I show you how local testing + automated deployment = cloud apps that ship faster, safer, and smarter.Stick around to the end, this is the final episode of WTH is the Cloud?!

Learn More
Learn More

Launch yourself in the world of local cloud development

Try for free
Try for free
Talk to Sales
Talk to Sales