8. If for all $\theta \in \mathbf{R}$, the modulus of the complex number $(a+\cos \theta)+(2 a-\sin \theta) \mathrm{i}$ does not exceed 2, then the range of the real number $a$ is $\qquad$
$$
\begin{array}{l}
|(a+\cos \theta)+(2 a-\sin \theta) \mathrm{i}|^{2}=(a+\cos \theta)^{2}+(2 a-\sin \theta)^{2} \\
=5 a^{2}+2 a(\cos \theta-2 \sin \theta)+1 \leqslant 4 \Rightarrow\left\{\begin{array}{l}
5 a^{2}+2 \sqrt{5} a-3 \leqslant 0, \\
5 a^{2}-2 \sqrt{5} a-3 \leqslant 0
\end{array}\right. \\
\Rightarrow\left\{\begin{array} { l } 
{ ( \sqrt { 5 } a - 1 ) ( a + 3 ) \leqslant 0 , } \\
{ ( \sqrt { 5 } a + 1 ) ( a - 3 ) \leqslant 0 }
\end{array} \Rightarrow \left\{\begin{array}{l}
-3 \leqslant a \leqslant \frac{\sqrt{5}}{5}, \\
-\frac{\sqrt{5}}{5} \leqslant a \leqslant 3
\end{array} \Rightarrow a \in\left[-\frac{\sqrt{5}}{5}, \frac{\sqrt{5}}{5}\right] .\right.\right.
\end{array}
$$

The translation is as follows:

$$
\begin{array}{l}
|(a+\cos \theta)+(2 a-\sin \theta) \mathrm{i}|^{2}=(a+\cos \theta)^{2}+(2 a-\sin \theta)^{2} \\
=5 a^{2}+2 a(\cos \theta-2 \sin \theta)+1 \leqslant 4 \Rightarrow\left\{\begin{array}{l}
5 a^{2}+2 \sqrt{5} a-3 \leqslant 0, \\
5 a^{2}-2 \sqrt{5} a-3 \leqslant 0
\end{array}\right. \\
\Rightarrow\left\{\begin{array} { l } 
{ ( \sqrt { 5 } a - 1 ) ( a + 3 ) \leqslant 0 , } \\
{ ( \sqrt { 5 } a + 1 ) ( a - 3 ) \leqslant 0 }
\end{array} \Rightarrow \left\{\begin{array}{l}
-3 \leqslant a \leqslant \frac{\sqrt{5}}{5}, \\
-\frac{\sqrt{5}}{5} \leqslant a \leqslant 3
\end{array} \Rightarrow a \in\left[-\frac{\sqrt{5}}{5}, \frac{\sqrt{5}}{5}\right] .\right.\right.
\end{array}
$$