https://pulumi.com logo
#general
Title
# general
m

many-spring-73557

08/09/2021, 8:35 PM
How can I have
pulumi up
create a single resource? There is the
-t
flag but my understanding is that the resource doesn’t have a URN yet, so I’m not sure what I would target. I have some other things that would be updated with
pulumi up
, and I want to make sure I only create this one thing and not run the other updates.
b

billowy-army-68599

08/09/2021, 8:37 PM
hmm, I think the only way is to separate this into its own project, or use a config flag on the stack to enable it
m

many-spring-73557

08/09/2021, 8:40 PM
I’m trying to add a new resource to a stack. I want to run
pulumi up
to add it to the stack, but I don’t want pulumi to update other resources as part of (e.g. helm charts that would be updated)
b

billowy-army-68599

08/09/2021, 9:12 PM
Have you made any code changes? It should only update if your code for the helm chart has changed
m

many-spring-73557

08/09/2021, 9:38 PM
the helm chart has changed.
pulumi up
shows a bunch of things that would be updated. I don’t want to update them yet - I only want to create the new resource that I added to my pulumi config
b

billowy-army-68599

08/09/2021, 10:31 PM
@many-spring-73557 - this was a good question, I didn't know the answer. It turns out, urns are predictable, so you can still use
-t
i grabbed the urn of the resource being created using
jq
but you can probably just run
pulumi preview
and copy it
Copy code
pulumi preview -j | jq '.steps[] | select(.op=="create") | .urn'
and then run
pulumi up -t <urn>
m

many-spring-73557

08/09/2021, 10:43 PM
ah, cool.
pulumi preview
doesn’t provide an urn (anywhere that I can see) but
-j
does
thanks!
b

billowy-army-68599

08/09/2021, 10:46 PM
you have to expand the
details
tab
279 Views