For more examples please check out the tests here.
NOTE:If you are using a versions 7.0.0 and up: modules can replace resources if certain set parameters differ from the results found in the API!
Parameters that can trigger a resource replacement:
size
disk_type
availability_zone
licence_type
user_data (Might trigger replace just by being set as this parameter is retrieved from the API as the image ID, so when using an alias it will always cause a resource replacement!)
image (Might trigger replace just by being set as this parameter is retrieved from the API as the image ID, so when using an alias it will always cause a resource replacement!)
image_password (Will trigger replace just by being set as this parameter cannot be retrieved from the api to check for changes!)
ssh_keys (Will trigger replace just by being set as this parameter cannot be retrieved from the api to check for changes!)
backupunit (Will trigger replace just by being set as this parameter cannot be retrieved from the api to check for changes!)