prehistoric-kite-30979
01/15/2021, 11:55 AMlemon-agent-27707
01/15/2021, 6:16 PMprehistoric-kite-30979
01/15/2021, 6:29 PMlemon-agent-27707
01/15/2021, 7:32 PMthanks, from the looks of it this is basically creating a "dynamic stack" and then using up/destroyNot sure what you mean by this. This program invokes the pulumi engine with a pulumi program and generates a state file.
prehistoric-kite-30979
01/15/2021, 7:33 PMlemon-agent-27707
01/15/2021, 7:34 PMI guess basically by ensuring an idempotent creation/update?Calling
stack.up()
will be idempotent (running the pulumi program). It would be your job to make sure that your database migrations are invoked in the program in an idempotent fashion.rhythmic-nail-73192
03/17/2021, 10:03 PMlemon-agent-27707
03/18/2021, 12:17 AMrhythmic-nail-73192
03/18/2021, 12:25 AMoutput.Apply
blocks until the input is ready, so I could trigger actions as a side-effect of the apply e.g.
bucket = s3.Bucket(...)
def side_effect(x: str) -> str:
lambda._get_invocation(...)
return x
# Force this resource to wait until bucket is finished, and our custom code has run
other_bucket = s3.Bucket(
logging_prefix=bucket.id.apply(
side_effect
)
)
you should avoid side-effects within the callbacks. For this reason, you should not allocate new resources inside of your callbacks either, as it could lead tobeing wrong.pulumi preview
lemon-agent-27707
03/18/2021, 1:39 AMrhythmic-nail-73192
03/18/2021, 2:02 AM