2. Given that $a$ is an integer, $14 a^{2}-12 a-27 \mid$ is a prime number. Then the sum of all possible values of $a$ is ( ).
(A) 3
(B) 4
(C) 5
(D) 6
2. D.

From the problem, we know
$$
\left|4 a^{2}-12 a-27\right|=|(2 a+3)(2 a-9)|
$$

is a prime number.
Therefore, $2 a+3= \pm 1$ or $2 a-9= \pm 1$, which means $a=-1,-2$ or $a=5,4$.
Thus, the sum of all possible values of $a$ is 6.