Terraform deployment template for Gitlab
<p>A few months ago I published an <a href="https://medium.com/@annelohmeijer/gitlab-pipeline-template-for-environment-variable-substitution-c458f97cda57" rel="noopener">article</a> 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 <code>.yml</code> files. Not <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="noopener ugc nofollow" target="_blank">DRY</a> 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 <code>.zshrc</code> , 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’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>