# $2^x$ exponential congruence

How does one go about solving this congruence: $$2^x+8\equiv0\pmod{27}$$ I wrote a program to go over many values of x, and it seems that $x=12+18t$ where $t\in \Bbb N$. How would I get to that conclusion without going through every x? There was a similar question here: Solution to exponential congruence, but unless I misunderstood, these solutions only work if 27 was a prime.

$a^x=a^t \space mod \space k$
And solve $x=t\space mod\space \phi(k) \space\space\space$ $\phi$ representing Euler totient function
Use Euler's totient theorem with $\varphi(27) = 18$.