This message was deleted.
# package-authoring
s
This message was deleted.
a
Hi @salmon-helicopter-31908. Import can work however you want it to. The
id
is an arbitrary string, so you can communicate anything you want in it. If you wanted to, you have have import take a JSON object representing inputs, and then model the import as a create (computing outputs). For example: Imagine a resource
Sum
with inputs
op1
and
op2
and output
result
. You could allow this:
Copy code
pulumi import pkg:module:resource three '{ "op1": 1, "op2": 2 }'
Read
would then return
{ ID: three, state: { op1: 1, op2: 2, result: 3 } }
. P.S.
Read
is used to model both
import
and
refresh
. An import will have no prior state, while a refresh will. You need to be careful that when
Read
is called for a refresh, it doesn’t change anything.