sparse-intern-71089
12/01/2020, 8:11 AMwitty-candle-66007
12/01/2020, 1:58 PMimport
option (https://www.pulumi.com/docs/intro/concepts/programming-model/#import)
I’m guessing that you may be able to use a get function for the given type of resource to get the information needed for the import option. And then there’s the matter of “removing” the import option after the fact for the stack resource after it’s been imported.
This does beg the question as to whether or not it’s possible to avoid the situation in the first place - i.e. avoid having to import existing resources on the fly.
Maybe you have a bulk import event initially and then manage things via pulumi going forward.
In this context, the CLI import
option maybe useful.
An example of which can be found for each API reference resource such as here: https://www.pulumi.com/docs/reference/pkg/aws/ec2/instance/#import
The CLI import will also generate the code for the resource.ancient-boots-22113
12/01/2020, 9:33 PMwitty-candle-66007
12/01/2020, 10:00 PMancient-boots-22113
12/01/2020, 10:47 PMwitty-candle-66007
12/01/2020, 11:01 PMancient-boots-22113
12/01/2020, 11:13 PMwitty-candle-66007
12/01/2020, 11:27 PMancient-boots-22113
12/02/2020, 5:16 AM