I have a question regarding nested resources. I'm ...
# package-authoring
s
I have a question regarding nested resources. I'm writing a provider for my cloud and I want to know if I can have a resource that has as argument a different resource. for example:
Copy code
import * as provider from @pulumi/myCloud

const myProject = new provider.Project("MyProject", {
  name: "my-fullstack-pulumi",
  region: "us-east-1",
  cloudProvider: "my-cloud"
});

const myDatabase = new provider.Database("MyDatabase", {
  project: myProject
  name: "my-database",
  type: "postgres",
});
Or do i have to define my database resource to have the
project
type and then manually set the outputs of
MyProject
in the
myDatabase
variable? Main point is that i have some resources which require a project to be created and i wanted some insight on how should i approach this problem