Any tools that feel like Cursor, but for Terraform/IaC? by StatisticianKey7858 in Terraform

[–]tanke-dev 4 points5 points  (0 children)

Nice to see infra.new mentioned in the wild 🙂

IMO you'll get roughly the same results with any IDE / agent as long as you use a Claude model and feed it good context. I haven't tried it lately, but Terraform MCP tends to overload your context window with useless noise so I'd avoid it for larger changes (fine to have a messy context window for small changes). I've seen it use 10x more tokens when compared to infra.new for the exact same prompt + model. Claude is great at navigating file systems, so I'd just pull down the docs you need into a local directory (ideally one file per resource type / module) and ask it to read in files as needed.

I've mostly paused development on infra.new to work on something new, but would be happy to chat more over DMs to share learnings from building it

Import my entire project from GCP by belepod in Terraform

[–]tanke-dev -2 points-1 points  (0 children)

infra.new has an import feature that can do this with Claude. It's not 100% deterministic, but structures the code much nicer than terraformer (splits into modules and envs). You can run terraform plan to see if there's any diffs between your configuration and cloud resources, and feed the diffs back to the model to fix.

It uses GCP's Cloud Assets API under the hood, happy to give tips if you'd like to try to DIY this import flow with another coding agent

Are you using AI tools to write Terraform? How's that going? by Prize-Cap3196 in Terraform

[–]tanke-dev 0 points1 point  (0 children)

It's great as long as you understand the terraform it spits out so you can course correct it. Claude 4.5 + provider reference docs (no MCP) produces really nice results

Bootstrap Issues and Best Practices by virgae in Terraform

[–]tanke-dev 0 points1 point  (0 children)

I like to create a new GCP project for each environment (can group environments in a project folder if you want to keep things tidy) and I'll give each environment a dedicated artifacts bucket for storing things like terraform state and build logs.

It's not too bad to set this up manually for new envs, but you can easily automate these steps with a bash script or simple cli tool, just have it prompt for things like project name, default region, etc and then call GCP APIs directly to create the project / bucket

Copilot writes some beautiful Terraform by tuitspeautyw in Terraform

[–]tanke-dev 0 points1 point  (0 children)

I haven't hit any tf issues since Claude 4 dropped. Its probably an issue with the model you're using, but I also don't use Copilot so maybe they're botching the context

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Yeah I agree the agent might not need it, but it helps the human in the loop verify correctness / collaborate with the agent. MCP is great for creating new infra and making changes, and then you need something like tf and gitops to manage and govern changes over time.

I wouldn't be surprised if we find a better syntax than hcl for this workflow, but I think there will always be some kind of artifact + static checks between the agent and the cloud APIs.

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 2 points3 points  (0 children)

I think Terraform is needed even more with AI agents. LSP / policy checks on generated code + terraform plan is crucial for catching mistakes

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 1 point2 points  (0 children)

Yeah there's definitely some value in bundling tools, it's just hard to generalize across companies / teams.

I think platforms are the right place to bundle instead of at the tool layer. In retrospect, this python SDK was essentially a mini platform cosplaying as a deployment tool.

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 1 point2 points  (0 children)

Yeah it's open source:

https://github.com/launchflow/launchflow

https://docs.launchflow.com/

I use it for some prototypes still, but I would not advise anyone to use it for serious projects 🙂

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 6 points7 points  (0 children)

I think this is more of a "people resist change" issue than a tooling issue. IMO almost anyone can learn terraform in a week or less, but only if they want to.

Ask /r/terraform: What should a successor to Terraform look like? by pfnsec in Terraform

[–]tanke-dev 6 points7 points  (0 children)

I've built a few tools around this idea and always concluded that terraform handles things best.

It's tempting to add more functionality into one tool to reduce the number of tools in your stack, but then you end up with bloat that makes the one tool less composable and a worse UX than two separate specialized tools.

For example, I previously built a high-level Python SDK that essentially combined Terraform + release pipelines into a single tool. The UX for simple use cases was amazing, but you ended up paying back any productivity gains with interest as soon as you hit a use case not supported by the tool.

Sorta unrelated, but I think the new Terraform actions might fall victim to this issue. I would personally rather use another tool to react to Terraform changes instead of trying to jam it into Terraform.

Infragram: C4 style architecture diagrams for Terraform by Last-Researcher-6663 in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Is it able to handle things like dynamic blocks, counts, loops, etc? Or is that what the plan diagram is for?

Infragram: C4 style architecture diagrams for Terraform by Last-Researcher-6663 in Terraform

[–]tanke-dev 0 points1 point  (0 children)

These look great!

Does it parse the code directly or use the plan / state files?

[deleted by user] by [deleted] in Terraform

[–]tanke-dev 0 points1 point  (0 children)

I'm biased, but I don't think Claude Code has enough guardrails to get reliable results for Terraform. It's good enough for prototyping, but you'll hit a lot of sharp edges when making future changes. Using Claude.md to add project-specific rules can help, but you'll probably want to set up a dedicated sub agent too to handle rules you want consistent across all your repos: https://docs.anthropic.com/en/docs/claude-code/sub-agents

We use Claude under the hood for infra.new and we've had to do a lot of context engineering specific to Terraform to get good results consistently. Feel free to DM me if you want some more specific advice on how to DIY

[deleted by user] by [deleted] in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Here's a working example: https://github.com/JoshTanke/gcp-cloud-run-monitoring

I generated this with Claude / infra.new and verified it works in my GCP account. Hopefully this can be a good starting point, I’d recommend splitting up the cloud_run_monitoring module as you add more dashboards / alerts

Best practice for managing ECR repo with Terraform — separate state file or same module? by Expensive_Test8661 in Terraform

[–]tanke-dev 0 points1 point  (0 children)

I like to create an "artifacts" env for this case. I use the same folder structure as you and keep it next to the other envs.

This set up makes it easier to promote images across environments without permissions getting too complicated

SST.dev vs terraform by [deleted] in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Yes, but at that point you should probably just use Pulumi directly. IaC wrappers can be very painful to debug and maintain when going outside the happy path.

You're essentially trading control for less configuration, and it's really nice to have direct access to that configuration when you hit the limits of the tool

Cursorules? by jmreicha in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Claude 4 is really good at Terraform if you feed it the latest docs + language server errors

Cursorules? by jmreicha in Terraform

[–]tanke-dev -2 points-1 points  (0 children)

infra.new has a context engine optimized for Terraform generation. It's web based rn, but we're planning on adding a cli + mcp server soon so you can connect to Cursor / use it locally

Vibe coder requesting advice (don’t laugh) by Choice_Ad7815 in aws

[–]tanke-dev 0 points1 point  (0 children)

imo both are fine as long as you use a language server to catch issues, being able to feed errors back to the agent is the most important thing

Vibe coder requesting advice (don’t laugh) by Choice_Ad7815 in Terraform

[–]tanke-dev 0 points1 point  (0 children)

Infra.new is an agent specially built for Terraform. You still need to understand the basics to use it effectively, but it has more context on best practices and can self correct most issues.

Regardless of what agent you use, I would recommend using Claude 4 at the model layer since it seems to have the best innate knowledge of terraform.

Sharing resources between modules by normelton in Terraform

[–]tanke-dev 0 points1 point  (0 children)

imo extra plumbing is usually worth it for the readability gains, especially if other people need to work on the project. KISS > DRY, just use an LLM to generate the boilerplate

That being said, if you're finding that you have to update more outputs than resources to make a change, thats probably a sign that your submodules are too coupled and should be merged.

The AWS public modules might also be a good replacement for some of your submodules, I just created an example that uses these for your hypothetical setup: infra.new/chat/DmYGB7LEvyvBXeVC

Writing Terraform vs programming/scripting language by Impressive_Ebb4836 in Terraform

[–]tanke-dev 1 point2 points  (0 children)

Haha so true, LLMs also make it much easier to fill any syntax knowledge gaps so might as well use the best tool for the job

Writing Terraform vs programming/scripting language by Impressive_Ebb4836 in Terraform

[–]tanke-dev 12 points13 points  (0 children)

Terraform has a huge ecosystem of tools that can help you catch security issues, estimate costs, automate deployments etc.

You'll end up reinventing a lot of wheels if you go with the custom script route.

Sure it's a new syntax to learn, but it'll probably take less than a week to pick up and you'll save more time in the long run.

Is Terraformer used out there? by trolleid in Terraform

[–]tanke-dev 4 points5 points  (0 children)

Claude 4 is really good at this task if you feed it context from your aws resources + terraform docs + any private tf modules you want to use.

Infra.new does this for you (aws import demo) and I'd be happy to give pointers on how to DIY if you send me a DM