Before getting into terraform & nomad, we have k8s and Jenkins.
Using Jenkins’s pipeline and k8s-CD plugin, it is quite easy to deploy to k8s cluster.
However, we introduced Nomad later.
There is no Nomad-CD plugin for Jenkins,
then we bridged that gap with terraform.
The final CI/CD would be Jenkins => CLI terraform => Nomad.
The only thing I have not figured out is how to handle terraform’s tfstate.
We are doing CI/CD, it is somehow awkward to check tfstate back into gitlab;
and to further my confusion, the tfstate seems to make less sense with Nomad provider,
since Nomad should be quite enough for state management.
So I suppose I could simply forget the tfstate in the CI/CD, just as k8s-CD plugin for Jenkins, any suggestions?