Hello,
I was always annoyed how my workflow for looking up the docs of a resource was:
- Jumping to the resource definition, e.g.
resource "aws_instance" "foo" - Yanking the type of the resource
- Opening my browser and searching for the resource
- Clicking on the (correct) search result
Finally, I wrote a plugin that does that for me. I just run :TerraformDoc and tf.nvim opens the documentation in the browser (configurable) for the current resource (block) my cursor is "in".
Another thing that was often cumbersome for me was viewing the current Terraform state and deleting resources from it. Now, I can just run :TerraformState, ...
Hello,
I was always annoyed how my workflow for looking up the docs of a resource was:
- Jumping to the resource definition, e.g.
resource "aws_instance" "foo" - Yanking the type of the resource
- Opening my browser and searching for the resource
- Clicking on the (correct) search result
Finally, I wrote a plugin that does that for me. I just run :TerraformDoc and tf.nvim opens the documentation in the browser (configurable) for the current resource (block) my cursor is "in".
Another thing that was often cumbersome for me was viewing the current Terraform state and deleting resources from it. Now, I can just run :TerraformState, and tf.nvim opens an interactive buffer where I can see all resources, drill down to a detailed JSON view, and delete resources from the state.
As a bonus, I added :TerraformValidate, which as the name suggests, runs terraform validate to quickly check if I messed something up.
Transparency:
I used AI assistance and it was horrible. Sure, I got a working result quite fast, but the quality and the decisions were sometimes questionable. The fast results were almost worthless as the "QA" work took longer than non AI code would require.
The worst is, that I had no fun working on tf.nvim. For me, writing Neovim plugins or my config is a welcome change from the YAML/HCL hell heaven in my day job (Cloud/DevOps). Working with AI took that away.