Menu

Testing Terraform with AWS Emulator and Localstack
📰

Testing Terraform with AWS Emulator and Localstack

DEV Community: terraform·Rudolf Olah·13 days ago
#hbscWHhj
Long article (746 words) — no AI summary yet.
Reading 0:00
15s threshold

When creating IaC (Infrastructure as Code), it can be useful, just as in other software development, to be able to run the environment locally. This isn't always possible for DevOps and IaC work since much of it relies on cloud providers that can change how their API responds from day to day. However, we still want to increase our confidence that when we use a particular service from a cloud provider, such as AWS S3 or AWS EKS or CloudFront or Lambdas, that those will work in an expected way.

For Terraform, a few years ago I set up a way to test Terraform changes with LocalStack, specifically with Terratest, the automated test framework for Terraform . It is not a requirement for testing Terraform, you can still do that by changing the endpoints that the AWS Terraform provider points to. LocalStack is still a fantastic tool for testing IaC and it came in very handy for testing Lambdas with S3 and SQS.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.