HashiCorp Terraform enables users to define infrastructure as code to safely and predictably codify, plan, and provision any infrastructure. Terraform can provision public cloud resources, private cloud resources, as well as service provider resources like DNS and monitoring to provide a consistent workflow for provisioning.
HashiCorp Terraform Enterprise provides integration with version control systems (VCS) to facilitate collaboration on infrastructure as code. Terraform Enterprise users have been doing version-controlled infrastructure with GitHub and Terraform Enterprise. We are excited to announce the addition of GitLab as a VCS integration with Terraform Enterprise. This post will discuss getting started with Terraform Enterprise and the first steps to setting up GitLab for your environment.
Getting Started with Terraform Enterprise
The Terraform CLI works great for individuals, hobby projects, and small teams, but like most CLI tools, it tends to not scale well without a centralized coordination system. The goal of Terraform Enterprise is to simplify using and coordinating Terraform in a team setting. The integrations with version control system such as GitLab are part of Terraform Enterprise. Visit the Terraform Enterprise site to get started.
Registering GitLab and Terraform Enterprise
The first part will be to register Terraform Enterprise as an OAuth Application within your GitLab account.
Once you save the form, you will be redirected to the OAuth Application view. Copy your Application Key and Secret as you will need them to connect GitLab to Terraform Enterprise.
The next part will be inputting your GitLab Application Key and Secret into the Terraform Enterprise UI.
From the Terraform Enterprise UI, you will copy the
Callback URL for your GitLab OAuth Client. Then on GitLab, select the terraform-enterprise OAuth Application. Enter the
Callback URL in the field labeled
Using GitLab with Terraform Enterprise
To use Terraform Enterprise with GitLab you will need to link to a Terraform Enterprise organization. During the authorization process, there will be a brief redirect to GitLab, from the Terraform Enterprise UI, in order to authenticate the client.
The next part will be to link the Terraform Enterprise User Account. During this authorization process, there will be a redirect to GitLab in order to authenticate your OAuth Client.
HashiCorp Terraform provides a consistent approach to provision any infrastructure. This is particularly important for organizations adopting cloud or transitioning to DevOps for application delivery. Consider a resource group on AWS compared to a set of Virtual Machines on Azure. Or a pool of servers on GCP compared to Virtual Machines on vSphere. Conceptually they are all the same and provide infrastructure. The work required to provision and manage them is actually a bit different. Terraform describes infrastructure using a common template in a high-level configuration syntax. The configuration file is then versioned and treated as you would any other code using a VCS. To learn more about our Terraform Enterprise or request a free trial visit www.hashicorp.com/terraform.html.