Recorded Webinar

VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket

What is the best way to integrate Terraform into your version control workflow? Find out in this video.

Update: There is a more up-to-date series of guides on this topic in the Terraform Cloud section of HashiCorp Learn.

Speakers

  • Jon Schulman
    Jon SchulmanSr. Product Manager - Terraform

Terraform Cloud's free tier makes it easy to use Terraform with best practices baked in. This includes best practices for connecting your version control system to Terraform for infrastructure code versioning and building an infrastructure delivery pipeline.

When you push changes to a connected VCS repository, Terraform Cloud will automatically trigger a plan in any workspace connected to that repository. This plan can be reviewed for safety and accuracy in the Terraform Cloud UI, then it can be applied to provision the specified infrastructure.

VCS Integrations Available

Terraform Cloud currently has integrations with Azure DevOps, BitBucket, GitHub, and GitLab. In this webinar, HashiCorp Senior Product Manager Jon Schulman will show you how to connect Terraform Cloud to your VCS, and the additional workflows in Terraform Cloud around config management/automation and creating reproducible infrastructure.

Outline

0:00 — Terraform Cloud Overview

8:03 — Demo: VCS Workflow for Terraform Cloud Workspaces, Modules, Policies, and Other Integrations

34:08 — Q&A

Q&A

  • Are cost estimations real-time from cloud provider APIs?

  • How do you organize your branches when you have multiple environments?

  • I have one repo that has modules for different services in an AWS account. Am I correct that I should have multiple workspaces connected to the one repo, but use different working folders for the main.tf?

  • What is the AWS IAM setup for Terraform Cloud to work with AWS? Our org has a rather strict requirement on IAM, for example, bot users won't have full administrative access to AWS. If we were to use Terraform Cloud, it would likely get a limited Write access to only certain AWS services/components? How do we configure this setup?

  • We have an on-site Azure DevOps instance. Will that work, or does it need to be internet-facing?

  • Can you use more than one VCS simultaneously?


  • What is the best way to handle stages (dev -> QA -> prod) with Terraform and VCS (same modules but different variables)?

  • Where is the Terraform state file stored? Can we access it in case we want to?

  • Can the state file within a TFC Workspace reference another state file in a separate TFC Workspace? In other words, if I have “dev” and “qa” workspaces, and want to see the diffs between them, is there a way to do that in TFC?

Slides

More resources like this one

  • 3/15/2023
  • Presentation

Advanced Terraform techniques

  • 2/3/2023
  • Case Study

Automating Multi-Cloud, Multi-Region Vault for Teams and Landing Zones

  • 2/1/2023
  • Case Study

Should My Team Really Need to Know Terraform?

  • 1/20/2023
  • Case Study

Packaging security in Terraform modules