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

5 takeaways for Running and Troubleshooting Serverless Applications Locally

Check out the recording of the hands-on webinar featuring Yan Cui, AWS Serverless Hero, and Waldemar Hummer, CTO of LocalStack, to learn practical use cases around monitoring serverless applications for local dev&test loops. Learn the best practices for debugging serverless applications using various AWS services to support your serverless workflows while troubleshooting errors and performance issues.In this video, you will learn about:- Building and Deploying Serverless apps locally- Common patterns and workflows for testing Serverless apps- Troubleshoot errors and performance issues in dev&test loops- Implementing observability with distributed tracing with Lumigo- Local Serverless Development with LocalStack

Learn More
Learn More
Artifact Integrity & Open Source Governance, the shift left way

In this talk, Teja explore the intricacies of the software supply chain and discuss strategies for protecting your software against supply chain attacks. He look sinto the risks associated with these threats, offer mitigation measures, and covers recommended practices for managing open-source software and Software Bills of Materials (SBOMs). This session aims to equip the audience with the knowledge and tools needed to enhance the security of their software supply chain.

Learn More
Learn More
Accelerate your cloud development with Cloud Pods and LocalStack

Cloud pods are persistent state snapshots of your LocalStack instance that can easily be stored, versioned, shared, and restored. Cloud Pods can be used for various purposes, such as:• Save and manage snapshots of active LocalStack instances.• Share state snapshots with your team to debug collectively.• Automate your testing pipelines by pre-seeding CI environments.• Create reproducible development and testing environments locally.In this session from LocalStack Community Meetup July '24, Bart Szydlowski explores how to use Cloud Pods to accelerate your cloud development & testing. He showcases how you can get started with Cloud Pods, integrate them into your testing pipelines, and make it easy for your team members to be onboarded to your cloud infrastructure — running all on your local machine!Docs: https://docs.localstack.cloud/user-guide/state-management/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