This message was deleted.
# aws
s
This message was deleted.
a
you can specify the ami in the ec2 resource instead of looking for it using
getAmi
- that should work
https://www.pulumi.com/registry/packages/aws/api-docs/ec2/instance/#ami_yaml hard-code the ami you need here - as long as you use the one you've used previously that shouldn't cause replacements
c
oh right that seems to work! what’s the best practice here? Now I have to fetch the ami id by myself and replace it to the
get_ami()
, seems a bit manual..
a
If you want a fixed AMI, then you should hard-code it. getAMI is useful if you want the AMI to stay up to date - note that that will cause a replacement.
👍 1
c
alright, thank you!
🚀 1
s
You could also use an
ignoreChanges
on the AMI property for the instance, but in general I agree with Venelin---if you want a fixed AMI, then supply it as a manually-entered configuration value.