Storing Terraform State in Gitlab
<p>Storing Terraform state in Gitlab is not much different then storing in AWS, Lets make changes for storing state in Gitlab</p>
<p>Create a project “Terraform” in Gitlab</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*rEHEFHBpe3HWTMGj_eWzog.png" style="height:318px; width:700px" /></p>
<p>also note project id, which is 1 in my case</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:342/1*mboQC3Fkp_DYyN48o2SPsA.png" style="height:131px; width:342px" /></p>
<p>Update Terraform code</p>
<p><iframe frameborder="0" height="259" scrolling="no" src="https://medium.muhammadumair.com/media/e3a4ee2b0b8a38a8ecfa6fedaaec0fa1" title="Terraform core gitlab state" width="680"></iframe></p>
<p>Generate Personal Access Token form here</p>
<pre>
https://gitlab-ci.muhammadumair.com/-/profile/personal_access_tokens</pre>
<p>At the end run following command, remember to update PROJECT_ID and PERSONAL_ACCESS_TOEKN before running bellow command</p>
<p><a href="https://medium.muhammadumair.com/storing-terraform-state-in-gitlab-c4b4c3ca4764"><strong>Website</strong></a></p>