This message was deleted.
# general
s
This message was deleted.
q
From my own experience you'll have to first import it exactly as it is.. Then you can change the content in your resource definition, and remove the import option.
☝️ 1
b
Unfortunately that means you need multiple runs and manual intervention. I'm dealing with multiple AWS accounts and this would be very inconvenient.
q
Hmm, can you look up the original value for each account first? I'm assuming you loop over the accounts?
b
Is there a way to get a list of resources? Then it would be a matter of if exists then import else modify
q
b
Yes, but with just that I don't know if I have to import or modify
Maybe with the document_version
q
Can't you use it to import first, from all accounts? Then when you're done with the importing, you can run again with a content update instead of the lookup.
b
Yes, that's my idea. I would have to run it twice to get the desired result, but it's still better than now. But I don't want to have to run a separate piece of code for that.
It's just that I don't know to differentiate between the import run from the modify run
Can you clarify what you mean by "import first"?
If there was a way to get the resource list from the stack, then I could know, but there doesn't seem to be a way to do so