Giter Site home page Giter Site logo

tf-unused's Issues

Does this tool work?

I may be missing something very obvious but I can't make this tool report any unused variables at all.

Basic replication:

variable test {
    type = string
}

resource null_resource name {
  triggers = {
    trigger = value
  }

  provisioner "local-exec" {
    command = "command"
  }
}

Running tf-unused displays nothing and returns 0.

Feature request : manage tfvars

Your tool is very useful and I use it a lot. However, I feel like a little feature is missing about tfvars file.

In my project, I have multiple tfvars :

  • One to create variables (full definition with default_value, name and description)
  • One to assign variables values

The second one looks like :

my_var = "value"
my_second_var = 5
...

tf-unused deals very well with variable definitions but not when I assign value to them.
It would be very helpful to add the ability to get a record when a value is assigned to a variable but there isn't a definition for it.

Thanks !

Make this a pre-commit hook!

This is great. I suggest making it a pre-commit hook: https://pre-commit.com/.

If not I can fork and do it as well. Just requires a config file and maybe a dockerfile since rust isn't officially supported. Might be able to just grab the binary, not sure.

Edit: I'm converting some other tools like this to pre-commit hooks. I can submit a PR after tinkering a bit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.