Git Product home page Git Product logo

Comments (8)

misraved avatar misraved commented on July 19, 2024 1

Fixed in #36

from steampipe-plugin-terraform.

cbruno10 avatar cbruno10 commented on July 19, 2024

Hi @cmollet , thanks for raising this issue!

Are you seeing the arguments column come through correctly for other tables? Are there any other columns in the terraform_module table that aren't coming through correctly?

@rollwagen While developing the terraform_module table, do you recall if there were any caveats to the arguments column?

from steampipe-plugin-terraform.

cmollet avatar cmollet commented on July 19, 2024

Are you seeing the arguments column come through correctly for other tables?

Yes, the terraform_resource table works as expected.

Are there any other columns in the terraform_module table that aren't coming through correctly?

Does not appear so, but I don't have many modules that use a lot of for_each or depends_on

from steampipe-plugin-terraform.

rollwagen avatar rollwagen commented on July 19, 2024

@cmollet - thanks for bringing this up!

@cbruno10 / @cmollet - just had a look. In the PR for the terraform_module we did have some discussion around arguments and variables, see #28 (comment)
However, the arguments column wasn't added somehow (?).

Just tried adding the arguments column in the code, in the same way as it was done here https://github.com/turbot/steampipe-plugin-terraform/blob/main/terraform/table_terraform_data_source.go#L97

The result for the query

SELECT name, split_part(path, '/', -1), arguments FROM terraform_module ORDER BY name;

using the sample terraform code

module "test" {
  source           = "../../../modules/lambda"
  s3_bucket_name   = var.aws_s3_name
  publish          = true
  role_name_prefix = "role-"
  owner            = var.owner
}

would look like

+------+------------+----------------------------------------------------------------------------------------------------------+
| name | split_part | arguments                                                                                                |
+------+------------+----------------------------------------------------------------------------------------------------------+
| test | main.tf    | {"owner":"${var.owner}","publish":true,"role_name_prefix":"role-","s3_bucket_name":"${var.aws_s3_name}"} |
+------+------------+----------------------------------------------------------------------------------------------------------+

Happy to do a PR if this output is what you'd expect.

from steampipe-plugin-terraform.

cbruno10 avatar cbruno10 commented on July 19, 2024

@cmollet Thanks for investigating! Yes, I think those results match what we'd expect, e.g., any non-meta arguments would be returned in arguments.

If you have time, we'd love a PR, and if you need any help with it, please let us know!

from steampipe-plugin-terraform.

cmollet avatar cmollet commented on July 19, 2024

Thank you @rollwagen ! PR to fix would be great

from steampipe-plugin-terraform.

misraved avatar misraved commented on July 19, 2024

Thanks @rollwagen for the quick fix 👍.

from steampipe-plugin-terraform.

cmollet avatar cmollet commented on July 19, 2024

I can confirm it's fixed in 0.6.0! Thanks for the fix @rollwagen !!

from steampipe-plugin-terraform.

Related Issues (20)

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.