swift-apple-1681209/27/2022, 11:42 AM
, because I don't have a stack state file like that, • I can't use
pulumi stack import
, because that wants to create things that already exist, • I can't use
, 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-5165009/27/2022, 12:09 PM
a (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
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-1681209/27/2022, 12:10 PM
limited-rainbow-5165009/27/2022, 12:17 PM
swift-apple-1681209/27/2022, 12:17 PM
limited-rainbow-5165009/27/2022, 12:20 PM
swift-apple-1681209/27/2022, 12:21 PM
limited-rainbow-5165009/27/2022, 12:24 PM
swift-apple-1681209/27/2022, 12:25 PM
limited-rainbow-5165009/27/2022, 12:28 PM
swift-apple-1681209/27/2022, 12:28 PM
limited-rainbow-5165009/27/2022, 12:29 PM
echoing-dinner-1953109/27/2022, 12:29 PM
swift-apple-1681209/27/2022, 12:29 PM
echoing-dinner-1953109/27/2022, 12:32 PM
works via IDs
swift-apple-1681209/27/2022, 12:33 PM
echoing-dinner-1953109/27/2022, 12:34 PM
discover 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-1681209/27/2022, 12:34 PM
echoing-dinner-1953109/27/2022, 12:35 PM
swift-apple-1681209/27/2022, 12:36 PM
echoing-dinner-1953109/27/2022, 12:37 PM
swift-apple-1681209/27/2022, 12:42 PM
echoing-dinner-1953109/27/2022, 12:43 PM
is for, to build a statefile for you from existing resources.
swift-apple-1681209/27/2022, 12:44 PM
echoing-dinner-1953109/27/2022, 12:55 PM
can take a JSON file with a list of all the resource:id pairs to import.
swift-apple-1681209/27/2022, 12:56 PM