Basil Musa
Basil Musa

Reputation: 8718

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

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?

Upvotes: 8

Views: 4064

Answers (1)

Alain O'Dea
Alain O'Dea

Reputation: 21686

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.

Upvotes: 6

Related Questions