Live data from Hacker News

Maximizing Terraform modules for platform engineering

thenewstack.io

1–8 of 8 posts

Re: Maximizing Terraform modules for platform engineering

#5
I’ve used Terraform modules for my personal infrastructure to keep things separated. They work fine for that.

Maybe if you work at a shop where you repeat the same thing, thinking of a module hierarchy that allows reuse makes a lot of sense.

But with HCL you’re essentially doomed to copy-paste your configuration anyways, so the takeaway for me is:

If you’re going to copy-paste Terraform code for entire, similar-looking projects, consider using modules.

Re: Maximizing Terraform modules for platform engineering

#6

It’s an ad for a tool that claims to generate terraform IaC code based on analysis of application code. Sounds cool if it actually works, but I’m skeptical.

It's open source, why not give it a try to overcome the skepticism.

To clarify, it doesn't magically generate Terraform, it uses concrete Terraform modules that you define and maintain and maps them to resource declarations that are made in the application code using CDKTF.

Re: Maximizing Terraform modules for platform engineering

#7
post #4

It’s an ad for a tool that claims to generate terraform IaC code based on analysis of application code. Sounds cool if it actually works, but I’m skeptical.

I, with 5-6 years of TF experience didn’t get anything from this at all

Thats nice :) Hopefully someone with less or more experience will.

Re: Maximizing Terraform modules for platform engineering

#8
post #5

I’ve used Terraform modules for my personal infrastructure to keep things separated. They work fine for that. Maybe if you work at a shop where you repeat the same thing, thinking of a module hierarchy that allows reuse makes a lot of sense. But with HCL you’re essentially doomed to copy-paste your configuration anyways, so the takeaway for me is: If you’re going to copy-paste Terraform code for entire, similar-looki…

The idea here is to get your modules more organized, so you can avoid actually copy pasting, but rather using version controlled modules.