How can I have `pulumi up` create a single resourc...
# general
m
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
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
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
Have you made any code changes? It should only update if your code for the helm chart has changed
m
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
@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
ah, cool.
pulumi preview
doesn’t provide an urn (anywhere that I can see) but
-j
does
thanks!
b
you have to expand the
details
tab
721 Views