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.

Related Talks

Improving Networking in LocalStack

Connecting your applications to LocalStack has not always been easy. In this video, Simon from the LocalStack team discusses how we streamlined the LocalStack networking experience. We discussed the challenges of connecting your applications to LocalStack and how we're simplifying the LocalStack networking experience. Simon also discussed about configurations required for more complex networking setups, and some common networking scenarios, with example configuration for achieving connectivity.

Learn More
Learn More
How to use AWS SDKs with LocalStack

LocalStack integrates with official AWS Software Development Kits (SDKs) so you can connect to LocalStack services using the same application code you use for AWS services. This lets you develop and test your applications locally without connecting to the cloud. In this video, we will talk about how you can connect to LocalStack emulated services using AWS SDKs.

Learn More
Learn More
How to save state in LocalStack?

LocalStack is ephemeral, so when you stop and restart it, all data is lost. You can use certain features to save the state & load it back when you restart LocalStack. This includes saving the local state for S3 buckets, DynamoDB tables, RDS databases and more. In this video, we explore three mechanisms that allow you to save state in LocalStack: persistence, state export and import, and Cloud Pods.

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