Terraform - Getting Started

Infrastructure as Code

Infrastructure as code (or IaC) is fast becoming the must have method for deploying and managing infrastructure. Most, if not all, cloud infrastructure service companies offer a way to deploy and configure infrastructure via declarative code.

Below you will find guides on how to deploy Twingate to the "big three" cloud providers:

All guides cover the deployment of the following infrastructure using Terraform:

Twingate

  • A new Twingate Remote Network
  • A new Twingate connector (attached to the Remote Network)
  • Access and refresh tokens created for the new connector
  • New Twingate resource for newly created Nginx virtual machine
  • New Twingate group for accessing new network and resource

Cloud Provider (GCP, AWS, Azure)

  • A new VPC
  • A new subnet in this VPC
  • Firewall rules
  • A new virtual machine with the Twingate connector installed and configured
  • A new virtual machine with Nginx installed and started

Recommended Tools

During this guide we will be using the following:

  • vscode (IDE, recommended but any text editor can be used)
  • Terraform (IaC)
  • Twingate API (Terrform provider)
  • Twingate client

Setup 💪

Before we going into the step-by-step guides, make sure the following is setup:

✅ vscode or other text editor installed
✅ Terraform installed
✅ Twingate enterprise account
✅ Twingate client installed


Did this page help you?