Terraform deployment template for Gitlab

<p>A few months ago I published an&nbsp;<a href="https://medium.com/@annelohmeijer/gitlab-pipeline-template-for-environment-variable-substitution-c458f97cda57" rel="noopener">article</a>&nbsp;on a Gitlab pipeline template to replace environment variables references in source code with the actual environment variables. A basic first step towards a more mature tool stack, that made life easier for the engineers in my team.</p> <p>Recently I spent an afternoon on something bigger, which had been bugging me for a while: each of our cloud resource is deployed with Terraform in the exact same pattern, all from their own pipeline definition. Our repositories contained lots of nearly identical Gitlab pipeline&nbsp;<code>.yml</code>&nbsp;files. Not&nbsp;<a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="noopener ugc nofollow" target="_blank">DRY</a>&nbsp;at all, susceptible to errors and involving work to maintain.</p> <p>Often I encounter processes or manual steps like these for which I think: is this something that can be scripted or automated? Resulting in developing useful commands in my&nbsp;<code>.zshrc</code>&nbsp;, to utility classes in Python packages, to pipeline templates for the team. Often this is a trade-off between the time you spent on automating it and the time you gain. But I think it&rsquo;s fair to say often one underestimates the potential gains.</p> <p><a href="https://medium.com/@annelohmeijer/terraform-deployment-template-for-gitlab-a8348f535724"><strong>Read More</strong></a></p>