Skip to content

Repository template to kick-start zero-touch Terraform Infrastructure as Code projects on Azure DevOps

Notifications You must be signed in to change notification settings

tkhadimullin/ado-tf-kickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bootstrap Azure DevOps with Terraform

Overview

This repo is intended as a kick-start template for infrastructure as code projects leveraging Azure DevOps and Terraform. Infrastructure definition are located in /tf and are intentionally very basic. The /bicep directory contains basic Terraform state bootstrapping code. It is possible that older agents

Prerequisites

The script requires curl and jq to make the API calls and parse responses.

The pipeline assumes it's running on Microsoft-hosted ubuntu-latest agents where all tooling like terraform and jq are already installed.

Running the template

Script requires a number of variables to work:

  • ADO PAT with sufficient permissions so it can create projects
  • Azure subscription details
  • AAD tenant Id for ADO to create Service Endpoint
  • AAD service principal for ADO to use when running the build/deploy pipeline
  • project name being created

The quickest way to start would be to download the bootstrap.sh and run it interactively. Environment variables are also accepted (see script for specifics):

wget https://raw.githubusercontent.com/tkhadimullin/ado-tf-kickstart/master/bootstrap.sh -qO bootstrap.sh && bootstrap.sh

The script will interactively prompt all required values, create ADO project, import this repository as starting point, register build pipeline, service connection and variables.

From there it should only need running the pipeline via ADO to deploy the infrastructure.

About

Repository template to kick-start zero-touch Terraform Infrastructure as Code projects on Azure DevOps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published