Unexpected re-creation of resources when modifying variable with for_each