Is there a way to build a time series that has a known autocorrelation function? Is there a way to build a time series that has a known autocorrelation function? For example a time series that has the following ACF $e^t\cos t$.

Yes, take a look at Yule-Walker as an example. It may not be the best way, but gives you an idea. Section 2.5 has the equation:
$$\bf\hat\Phi=R^{-1}r$$
where $\bf r,R$ - are a ACF and the matrix constructed from ACF; and $\bf\Phi$ are lag coefficients of AR Tim-series.
