Is it possible to have nested component resources,...
# general
e
Is it possible to have nested component resources, ie. a component resource (Entity) containing another component resource (Pipeline)? For me it looks like the resources are successfully created but they are not and when trying to delete I get an error message with a really weird reference to the resource, i.e. I can't even delete the resource.
Copy code
pulumi state delete urn:pulumi:prod::astro::custom:app:Entity$custom:app:Pipeline$gcp:cloudscheduler/job:Job::o40-malmo-scheduler

> error: No such resource "urn:pulumi:prod::astro::custom:app:Entitypp:Pipelineloudscheduler/job:Job::o40-malmo-scheduler" exists in the current state
s
What tool did you use to create that graph? Sorry, I am no help to your specific problem.
e
That is a feature in the Pulumi service
s
Ah nice! Did not know that. Thanks
b
add ” ” around the resource urn
e
@billowy-horse-79629 thanks! And now I saw:
Make sure that URNs are single-quoted to avoid having characters unexpectedly interpreted by the shell.
🙈
@billowy-horse-79629 have you tried nested component resources and got the to work?
b
You mean deleting state of parent resources ? It suppose to throw you kind of an error that you must clean the nested resources first.
e
I was thinking about creating nested component resources, for me they show up as successfully created resources in Pulumi but in fact never created
I ended up moving child component resources (level 2) to the parent component resource and that works great, but having an extra layer would enable more modularity and reuse of component resources