Integrating Terratest with Terraform and Terragrunt: Best Practices?

0
7
Asked By CuriousKitten2023 On

I'm working on integrating Terratest into a fairly large Terraform repository that's orchestrated using Terragrunt for our AWS resources. The organization has fully adopted Terragrunt and Terraform for deployment. I'm looking for advice on how to effectively use Terratest for integration testing of Terraform modules that are managed through Terragrunt. My searches for best practices or insights have come up pretty empty, and I've noticed a lack of discussion on the implications of combining Terraform, Terragrunt, and Terratest. If anyone has experience with this setup, I'd love to hear your lessons learned, whether they're positive or negative. Thanks for your help!

3 Answers

Answered By TechWhisperer87 On

You might want to check out the official documentation on HashiCorp’s developer site before jumping into Terratest. It’s always best to start with native tools and expand as necessary.

CodeNinja90 -

Totally agree, starting with what's built-in can save headaches later on.

Answered By GruntMaintainer101 On

Hey! As someone involved with Terragrunt and Terratest, I completely agree that we need better documentation on integrating the two. You can reference the integration guide in the documentation, and we’re working to make it easier to find. I’d also suggest checking out our example catalog for reusable infrastructure patterns that are designed for testing. It’s also a good idea to join our Discord community for real-time support from fellow users!

Answered By CloudMasterPro On

From a previous team experience, we relied on Terratest for shared Terraform modules since they’re used frequently. I set up a nightly pipeline for testing to catch any issues early, which was super effective. Just remember to clean up resources if tests fail! I even flagged bugs with Azure before they were acknowledged by Microsoft, thanks to my tests! Definitely recommend using Terratest for your modules.

SQLGuru11 -

Yes, same here—Terratest is invaluable for module testing. Never used it for infra repos, but for apps, it's great!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.