The initial production of the base model for the 21.5" iMac didn't come with a slot for the SSD. Later production models included the SSD slot, but there's no way to determine if the 2012 21.5" iMac with a 2.7GHz processor has the SSD slot without opening it up to see if it's available. If you have already opened the iMac up and it does have an SSD slot, this SSD is compatible.