https://pulumi.com logo
Title
e

eager-thailand-33661

03/22/2022, 2:38 PM
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.
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

shy-library-2927

03/22/2022, 2:56 PM
What tool did you use to create that graph? Sorry, I am no help to your specific problem.
e

eager-thailand-33661

03/22/2022, 5:35 PM
That is a feature in the Pulumi service
s

shy-library-2927

03/22/2022, 6:34 PM
Ah nice! Did not know that. Thanks
b

billowy-horse-79629

03/23/2022, 12:56 PM
add ” ” around the resource urn
e

eager-thailand-33661

03/23/2022, 1:47 PM
@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

billowy-horse-79629

03/23/2022, 2:12 PM
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

eager-thailand-33661

03/23/2022, 2:21 PM
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