Creating multiple resources with one API call

Dear Terraform Community,

I’m currently working on a terraform provider. I have a resource type that, during creation enforces the creation of a different resource type that can also be managed independently by the provider ( think database + acls ). I wanted to ask if there is a canonical way to let terraform know that it created two resources with the one api call?

Thank you,
Michael

In that case, you might want to write a module not a resource. Resources should encapsulate a single object, not multiple.

1 Like