This message was deleted.
# general
s
This message was deleted.
d
Based on the docs, yes. https://www.pulumi.com/registry/packages/aws/api-docs/ec2/instance/#ami_nodejs Note the symbol next to "ami", which signifies recreate on change
c
Is there any way to get that AMI id to be "sticky". Like the first time the code it run, it gets the latest and greatest AMI, but on subsequent runs, if the ec2 instance is already running, it leaves it alone?
d
I think you want a Launch Template, however it's been many years since I've worked with ec2 instances
c
If the search criteria for the AMI changed, I'd want the ec2 instance to get updated. But as long as the AMI currently being used by the instance matches the filters that found the AMI, it would be nice if there would be some way to keep it.
s
You might be able to use
ignoreChanges
on the AMI property of the EC2 instance (just an idea, I haven’t tested it).