3 ms·
Show HN: Fake Terraform modules for fast testing and learning
I often use these reusable modules to sketch ideas during live demos or for tutorials about Terraform patterns, where actual resource creation would be a waste of time and money. Contributions, especially for other clouds, are welcome, as I only know what is helpful for AWS.
They're handy for beginners to understand how to wrap and manage reusable modules from root modules and for more advanced users who want to experiment with Terragrunt.
- quickthrower2 3y agoThats a cool idea. I am guessing you need this because say you create a resource like an EC2 instance you meed some kind of ID or even IP address to pass to some other infrastructure code or even application code. Otherwise a preview would be OK? I use Pulumi but I am assuming concepts are similar.
- iangrunt 3y agoExactly. If I can guarantee that if I'm calling an EC2 module tested and demonstrated to work correctly, launching it in the early stages of development can be a significant time sink. However, due to the nature of AWS and being able to authenticate to one region and make calls to another, it's nice to have the authenticate path working correctly from Step 1. I have never used Pulumi, but I think the same path would apply; you want to focus on the business logic, and waiting for an EC2 to spin up and down while you're iterating gets annoying quickly. Once you have all the kinks worked out, you can drop in your actual EC2 module and expect the same authentication patterns (where many bugs happen), although the outputs would most likely need some tune-up.
- lenova 3y agoNice idea! Long term, this could be a nice local dev/testing setup if it gets close to supporting most Terraform resources.
- iangrunt 3y agoThanks! I'd love to get it there someday. I started it before the AI explosion, but once the basic regexes get figured out, they can write themselves since most other outputs are ARNs or IDs that follow the usual "thing-012345" pattern. Feed it some Terraform docs, spit out some string substitutions, and feed them into a template to get you close enough. My motivation was definitely based on the many late-night hours I've wasted waiting for plans to finish.