Can I expose all the attributes for a terraform resource in a single output variable?

Viewed 731

I need to expose all the attributes for a specific resource in a single output variable for a terraform module.

Is this doable in terraform?

1 Answers

Yes,

output "my_vm" {
  value = aws_instance.my_vm
}

But you'll get a ton of weird junk in there so it may not be worth it.

Related