Terraform ??? Using Private Git Repo As Module Source and Run through pipeline

Use Case Explanation:

  1. If your organization has placed the Terraform generic modules in a different(centralised) private repository, and you want to refer those private repository module in your terraform code then follow this article.
  2. In this article, we will see, how you can refer the Terraform module from the private git repo. My focus will be to discuss on HTTPSmethod for referring the module from central repository.
  3. I will show how we can authenticate to private git repository usingGit Personal Access Tokenmethod. This method can be used in the Terraform infra deployment pipeline.

Assumptions:

  1. You already have private git repo where you have placed generic terraform modules.
  2. Your pipeline slave/worker container/machine has terraform and git installed. (Terraform Infra Automated Deployment)

Learn More

Tags: Git private