Is there a simple pattern for a one-time deploymen...
# general
e
Is there a simple pattern for a one-time deployment of a resource? For example, with aws OIDC providers there can only ever be one per provider URL, so we only want this resource deployed once ever, not once per stack, but we also don't want it torn down on other stacks because of the diff.
The suggestion by pulumi AI results in the diff causing pulumi to think we're wanting to destroy the oidc provider on subsequent runs
Oh, maybe I'm being dumb about this.. I could just check the stack name and if it's
production
then we deploy this resource and if not.. we don't.
Then anything that needs that resource can pull the output from the production stack?
Yep, that turned out to work.
l
A better approach is to use different projects for this. If you want only one of a certain resource, then it should be in a project that has only one stack.