Hey, as part of my deployment, I need to run some ...
# typescript
a
Hey, as part of my deployment, I need to run some code every time I create / replace a specific ec2 instance. I have not found the api to do so, I was expecting some kind of lifecycle event such as:
Copy code
let instance = new aws.ec2.Instance( ......);
instance.onReplace((_) => {myCodeHere;})
Is this possible with Pulumi ?
o
You can use the Pulumi Command provider: https://www.pulumi.com/registry/packages/command/
One of the first examples is doing some remote setup on an EC2 instance. Hope this helps!