AWS Mac EC2 resources gets destroyed and recreated without any change to the resource

Terraform,
I recently encountered a bug, while I run my terraform script which provisions a mac ec2 and other resources without any changes to ec2 resource it gets updated(destroy/create). Can someone help with this. Thank you.