:wave: , does anyone have a clean way to generate ...
# terraform
m
👋 , does anyone have a clean way to generate outputs/variable files?
l
i dunno how you'd identify outputs to generate them. but here's a tool that will generate a variables.tf from all var references... https://github.com/YakDriver/scratchrelaxtv
👍 1
m
Thanks for that!
Mainly looking for a way to generate all the boilerplate stuff for a module. Say given a main.tf with xyz resource, a tool that will generate a bunch of generic outputs for xyz resource
l
it's not for everyone, or every module, but i often just output the entire resource. that might give you a way to generate outputs automatically, since you wouldn't need to know the attributes... but you'd still have to name the output at least...
Copy code
resource "aws_iam_role" "this" {}

output "aws_iam_role_this" {
  value = aws_iam_role.this
}
m
That's a great idea, thanks for that @loren!
e
Also consider Yeoman or Cookie Cutter?
👀 1
m
I've never used either actually