swift-apple-16812
09/27/2022, 11:42 AMpulumi stack import
, because I don't have a stack state file like that,
• I can't use pulumi up
, because that wants to create things that already exist,
• I can't use pulumi refresh
, because it (apparently) doesn't care what I've declared, only what's in the stack state file.
• I refuse to believe that the idea is to manually import each resource again, like a peasant.
I should also point out that it would be nice if nomenclature and docs could be clearer on what's a resource in a program, in a stack state and with the actual cloud provider, at least two of these are very different, right?limited-rainbow-51650
09/27/2022, 12:09 PMa (Python) program with a bunch of imported resources.I’m not sure I understand. If you have a program with a bunch of imported resources, these resources should then be in your state file and
pulumi up
shouldn’t create these a second time. Either your description of “imported resources” is not what we understand of being truly imported resources into the state file, or I am missing something about the current state of your setup.swift-apple-16812
09/27/2022, 12:10 PMlimited-rainbow-51650
09/27/2022, 12:17 PMswift-apple-16812
09/27/2022, 12:17 PMlimited-rainbow-51650
09/27/2022, 12:20 PMswift-apple-16812
09/27/2022, 12:21 PMlimited-rainbow-51650
09/27/2022, 12:24 PMswift-apple-16812
09/27/2022, 12:25 PMlimited-rainbow-51650
09/27/2022, 12:28 PMswift-apple-16812
09/27/2022, 12:28 PMlimited-rainbow-51650
09/27/2022, 12:29 PMpulumi refresh
is for.echoing-dinner-19531
09/27/2022, 12:29 PMswift-apple-16812
09/27/2022, 12:29 PMpulumi refresh
echoing-dinner-19531
09/27/2022, 12:32 PMrefresh
works via IDsswift-apple-16812
09/27/2022, 12:33 PMechoing-dinner-19531
09/27/2022, 12:34 PMdiscover and replace resourcesYeh that's only doable if it's safe to assume that Pulumi is fully managing the entire cloud account. Which is so rarely the case that we haven't put effort into supporting it.
swift-apple-16812
09/27/2022, 12:34 PMechoing-dinner-19531
09/27/2022, 12:35 PMswift-apple-16812
09/27/2022, 12:36 PMechoing-dinner-19531
09/27/2022, 12:37 PMswift-apple-16812
09/27/2022, 12:42 PMechoing-dinner-19531
09/27/2022, 12:43 PMpulumi import
is for, to build a statefile for you from existing resources.swift-apple-16812
09/27/2022, 12:44 PMechoing-dinner-19531
09/27/2022, 12:55 PMpulumi import
can take a JSON file with a list of all the resource:id pairs to import.swift-apple-16812
09/27/2022, 12:56 PM