https://infracost.io logo
#general
Title
# general
h

hallowed-caravan-40528

06/17/2021, 5:23 PM
Probably some day this week I'll open a PR in terraform's repo for supporting state and plan files from stdin in
terraform show
command as we discussed the importance of this in this issue. Even if we decide to bundle terraform-exec into infracost, i think that would still be valuable for other use-cases and tools. Anyone wanna jump-in?
šŸ”„ 1
w

white-airport-8778

06/17/2021, 10:58 PM
Iā€™m taking part in a live ā€œYour Weekly Dose of Terraformā€ episode tmrw (

https://www.youtube.com/watch?v=_UsK-pKYrPsā–¾

) but have time in the afternoon if I can help with any testing or idea-bouncing if thatā€™s helpful
h

hallowed-caravan-40528

06/18/2021, 9:27 PM
@white-airport-8778 I don't think its gonna work as we expect,
terraform show
needs the providers and backend initialized before marshalling to json... Even pipeing the plan to
terraform show
stdin would need the user to call the command from cwd where the .terraform folder is (as well as having the terraform binary installed)
šŸ˜ž 1
And terraform-exec only wraps the installation of terraform binary as well
That means that neither would help in our situation I think so šŸ˜”
We're strongly dependent on the terraform binary either way
Just for context, the
show
commands needs the providers schemas to be able to marshall the plans/state files, I think we have our back agaisn't the walls here. Any ideas?
w

white-airport-8778

06/18/2021, 9:34 PM
Unfortunately not but @little-author-61621 is probably best to answer as he knows that side of the code better than me
šŸ‘ 1
l

little-author-61621

06/19/2021, 10:32 AM
Just for context, theĀ 
show
Ā commands needs the providers schemas to be able to marshall the plans/state files
Could https://github.com/hashicorp/terraform-schema help?
Not sure it would help at all though as looks like we'd still need the binary to get the provider schemas.
h

hallowed-caravan-40528

06/21/2021, 12:27 PM
@little-author-61621 Yes, seems like it! lets move this discussion to the issue, shall we? https://github.com/infracost/infracost/issues/811#issuecomment-864991073 good morning!
šŸ™Œ 1
6 Views