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

rich-whale-93740

09/06/2023, 3:54 PM
Does
state
support modifying the provider of a resource?
s

salmon-account-74572

09/06/2023, 4:02 PM
Generally speaking, changing the provider of a resource also changes the resource’s URN, which means Pulumi will recreate the resource on the next
pulumi up
. To alleviate this, alias the new provider to match the old provider’s name: https://www.pulumi.com/docs/concepts/options/aliases/
r

rich-whale-93740

09/06/2023, 4:40 PM
Thanks Scott! Yes I'm aware of
alias
. I just wanted to see whether we can keep it cleaner without having
alias
in the code
s

salmon-account-74572

09/06/2023, 5:10 PM
I don’t believe so (but I’m human so I could be wrong).