Testing Terraform AWS Modules in Harness CI with LocalStack

LocalStack enables organizations to automate their application testing and integration process through DevOps practices, such as continuous integration (CI). LocalStack allows organizations to move away from complicated AWS testing and staging environments by enabling a key component of testing and delivering cloud-native applications.To further automate the process, we use Infrastructure-as-Code (IaC) frameworks like Terraform that allow you to create your resources declaratively and apply those resources. Testing your Terraform modules against the real AWS cloud can be time-consuming and costly and can make you run into the risk of dangling resources after an unsuccessful CI run. Using LocalStack to emulate a mock ephemeral AWS infrastructure on CI pipelines allows you to work on the same functionality the real AWS cloud provides while cutting down testing costs and deployment times.In this session, Jim Sheldon, Senior Developer Advocate at Harness, will demonstrate how to use LocalStack to test Terraform modules on Harness CI. Harness CI allows you to create software pipelines that will enable you to check out your code, build the software, run your tests, and validate every code change. We wind up the session with updates about the all-new LocalStack release!

Related Talks

Test Your Cloud Like You Mean It: Integrating Testcontainers and LocalStack

You’ve been there: Your Unit tests pass both locally and in CI. You deploy with confidence. You thought.. Then staging in the real cloud reveals the truth—bugs that only show up with actual RDS parameter settings, real SQS and SNS throughput limits, or Lambda and API Gateway behaviour your local mocks never captured.

The solution is Testcontainers.

Testcontainers is a testing library that provides easy and lightweight APIs for bootstrapping integration tests with real services wrapped in Docker containers. Using Testcontainers, you can write tests talking to the same type of services you use in production without mocks or in-memory services. Spin them up, run migrations, execute your Node.js service against them, assert results, auto-cleanup.

Learn More
Learn More
Why local AWS environments are faster, easier, & more efficient

So many of the challenges that slow down software development stem from the fact that early-stage dev & test cycles are performed in cloud environments.

Local cloud development removes these challenges.

By simulating AWS application behavior in a local container, the local cloud enables developers and agents to validate the security, quality, and reliability of their applications faster and more effectively than they can on the cloud.

Learn More
Learn More
Introducing lstk: The New LocalStack CLI

Silvio and Carole introduce lstk, LocalStack's next-generation CLI built from scratch in Go. They explain why the team rebuilt the CLI, walk through its key features — zero-config startup, seamless browser-based authentication, and a rich interactive TUI that surfaces real-time progress and actionable errors — and demo how lstk gets you from install to a running emulator in seconds. They also dive into the architecture behind lstk and how it is designed to support multiple emulators, flexible runtimes, and deep integrations with CI pipelines and IDEs.

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