curious if in pulumi i can lazily update propertie...
# general
curious if in pulumi i can lazily update properties? for example i would like to create a lambda function but then update its environment inside an
callback since the AWS API supports an update i know i can do it all in one step and this isn't a very declarative question but i'm working on something lower level that would benefit from this
It’s not currently possible but we’re trying to work out a way of doing this because it allows us to do circular dependencies
But as you say, it’s not very declarative which makes it hard
yeah the circular dependency was actually the reason i asked
i guess in my case i can create a resource called UpdateFunctionEnv which handles this right
Can you do it from the command line?
sorry not following, do what?
it’s a bit… hacky… but if you can update the environment using the AWS CLI then we have the command provider for this: but it might be a workaround
What would your
ah yeah i could use that
i would basically just want to run the
aws-sdk v3 command
Yeah - the
package is probably the best way to go for now. That will ensure you can control the lifecycle of these additional actions as part of the CRUD lifecycle (unlike with
which just runs on every update). We would love in the future to allow something like Command but with callbacks you can implement directly in code (as callbacks invoked on Create/Update/Delete), so that you could just use the SDK directly instead of having an AWS CLI dependency. There's some other discussion on future opportunities in this direction in, and
gotcha makes sense i'll poke through those
giving some tools for circular deps would be major - one of our biggest places we have hacks in CDK
Command and a dynamic provider are roughly the same solution in this case right? i wanted to avoid spawning a new process