This message was deleted.
s
This message was deleted.
s
I think you need to set the 'import' resource option. -> Adopting Existing Resources
v
Ahhh, thank you 🤦 So here, I would try to find any existing ID and set
import
to it's name if one exists right?
i
In general Pulumi likes to create everything itself and then own it. It stores that information either in a local state file (free) or in the cloud (money). You keep referring to that state file as you update your Pulumi script and do your updates.
v
@incalculable-engineer-92975 Got it, makes sense -- thank you. So does that imply that trying to wrap every provider with a check for existing resources and dynamically setting
import
would be a poor pattern, and instead I should manually import once then remove it?
i
you want (if possible) to create everything with pulumi - using import is a very bad pattern
v
Ah, hmm. In the case of existing infra like the domain name here, what's the move then? Delete the existing one and create fresh one?
l
No, that is the time you use import. Using import isn't a bad pattern, it's a solution to the problem of "how do I manage my existing resources?" If you don't have existing resources, then it would be less than ideal to create them outside Pulumi then import them. If you do have existing resources, then import is exactly the correct thing to do.
🙏 1
👌 1