• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language HCL
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code examples for the Pluralsight course Implementing Terraform on Microsoft Azure

Implementing-Terraform-on-Microsoft-Azure

Welcome to Implementing Terraform on Microsoft Azure. These exercise files are meant to accompany my course on Pluralsight. The course was developed using version 0.12.10 of Terraform. As far as I know there are no coming changes that will significantly impact the validity of these exercise files. But I also don't control all the plug-ins, providers, and modules used by the configurations.

Update: Well folks, version 1.0 of Terraform is out and naturally a bunch of stuff has changed since 0.12.10 that broke the configs. Weeeee! I have updated all the configurations to accomodate the changes, but the videos in the course have not yet been updated. What you see in the demo will diverge from what's in the exercise files, but the core concepts remain the same. The current plan is to overhaul the course in the second half of 2021. You can find the changes in the CHANGELOG file.

Using the files

Each folder follows in succession as the course progresses. In some cases, you will need to copy files from one directory to another. Assuming you are following along with the course, when to copy the files and where should be fairly obvious. Many of the folders include a commands.txt file that has example commands for that portion of the exercise. Other folders may include an example of a file you'll need, for instance the 9-app-deploy folder has the terraform.tfvars.example file. Simply update the values in the file and rename it to terraform.tfvars.

Each module in the course builds on the infrastructure created by the previous module. Bearing that in mind, jumping around in the course will be difficult. When you complete a module, you might be tempted to run terraform destroy to delete the resources. You can do that, but remember that you will need to deploy the resources again for the next module.

Terraform Marketplace Item

Sigh, the Terraform marketplace item I used in the course has been deprecated and you can't find it anymore. Grrr... You've got two options for that portion of the course.

  1. Login to the Azure CLI as the security user on your local desktop and run the commands. This is the "easy" option.
  2. I've added a new folder that will deploy the necessary resources using Terraform. It's called zz-terraform-vm. Using Terraform to deploy Terraform? Yes! Why not? Check out the commands.txt file in that directory for more information.

Azure DevOps Pipelines Update

Since the release of this course, Azure DevOps Pipelines has moved to a YAML defined pipeline model. You can still build pipelines the "classic" way, but using YAML and storing the pipeline config in source control is preferred. I have created new files in 6-azuredevops that include the whole pipeline config using the new YAML style.

Follow the directions in the commands.txt file in the same directory to follow the process of setting up the YAML based pipelines. It will be different than the video, which will be updated with the rest course in late 2021. I'm also going to add more steps for validation and formatting.

Course Prerequisites

There are a few prerequisites for working with the course files.

Visual Studio Code

You are going to want to use Visual Studio Code or a similar code editor. Personally I like VS Code because it's free and cross-platform, and it has source control built-in. But hey, that's just me. You do you.

Azure Subscription(s)

This is a course all about using Terraform on Microsoft Azure. It is safe to assume you'll need at least one Azure subscription and the Owner or Co-administrator role on that subscription. The exercises use two subscriptions - one for networking and another for security - to demonstrate multiple instances of the AzureRM provider.

You don't have to use two separate subscriptions, instead you could use the same subscription for all the exercises. I haven't tested that, and some of the automatic role creation might fail. It's probably just as easy to create an extra subscription and delete it when you are done the course.

Azure Active Directory Rights

The course includes use of the AzureAD provider, and it assumes that you have permissions to create Service Principals within the Azure AD tenant associated with your Azure subscriptions. Assuming you created subscriptions and an Azure AD tenant for this course, then you shouldn't have any problems.

Azure DevOps Subscription

The course also makes use of Azure DevOps Repos and Pipelines. The basic Azure DevOps plan is free for up to five users. You will also need to add the Terraform Build & Release Tasks extension from the Visual Studio Marketplace.

MONEY!!!

A gentle reminder about cost. The course will have you creating resources in Azure. Some of the resources are not going to be 100% free. I have tried to use free resources when possible, but Azure VMs, Azure Storage, and App Service all cost money. We're probably talking a couple dollars for the duration of the exercises, but it won't be zero.

Each module builds on the previous one to create a complete deployment for the Globomantics scenario. As I mentioned before, destroying the resources after each module will make things more difficult. For that reason, I waited until the last module to deploy any actual Azure VMs or App Services. Those are the things that will actually cost you money. Once you complete the course, I highly recommend tearing everything down with terraform destroy or by deleting the Resource Groups in Azure.

Conclusion

I hope you enjoy taking this course as much as I did creating it. I'd love to hear feedback and suggestions for revisions. Log an issue on this repo or hit me up on Twitter.

Thanks and happy automating!

Ned

More Repositories

1

Getting-Started-Terraform

Exercise files for my Pluralsight course
HCL
558
star
2

terraform-tuesdays

Demo files for various Terraform Tuesday Examples
HCL
385
star
3

Deep-Dive-Terraform

Exercise files for my Pluralsight course.
HCL
185
star
4

Implementing-Terraform-on-AWS

Exercise files for the Pluralsight course
HCL
64
star
5

Getting-Started-Vault

Shell
59
star
6

Hashicorp-Certified-Vault-Associate-Getting-Started

Exercise files for my course Hashicorp Certified Vault Associate: Getting Started
Shell
40
star
7

Managing-HashiCorp-Vault

HCL
25
star
8

ado-labs-github-actions

Demo files for the Azure DevOps Labs episode about GitHub Actions and Terraform
HCL
21
star
9

CKA-Study-Guide

My personal study guide for the CKA
20
star
10

vault-oidc-github-actions

A demonstration of using GitHub OIDC to authenticate to HashiCorp Vault
HCL
20
star
11

Hashicorp-Certified-Vault-Associate-Vault-Management

Exercise files for my Pluralsight course.
Shell
18
star
12

Terraform-FotD

Terraform Function of the Day
HCL
18
star
13

Azure-Identity-Management

PowerShell
17
star
14

Azure-Information-Protection

PowerShell
17
star
15

vault-policy-testing

Python
16
star
16

advanced-networking-on-aws

Exercise files for the Advanced Networking on AWS course on Pluralsight
Shell
16
star
17

Installing-and-Configuring-HashiCorp-Vault

HCL
15
star
18

Configuring-and-Managing-Microsoft-Azure-Key-Vault

I really feel like the name says it all.
PowerShell
15
star
19

learning-opa-and-terraform

A Tutorial on Using Open Policy Agent with Terraform
Open Policy Agent
14
star
20

hashitalks-aks-pod-id

HCL
11
star
21

PowerShellHelperScripts

Random Helper Scripts in PowerShell
PowerShell
10
star
22

ado-labs-validate-iac

Demo files to accompany the Microsoft Azure DevOps Labs presentation.
HCL
10
star
23

Getting-Started-with-Terraform-Cloud

HCL
10
star
24

Implement-an-AVD-Infrastructure

Exercise files to accompany my Pluralsight course
HCL
9
star
25

Configuring-Encryption-for-Data-at-Rest-in-Microsoft-Azure

PowerShell
8
star
26

azure-swa-hugo-blog

Code to deploy and maintain an Azure Static Webapp running a static web site generated with Hugo and GitHub Actions.
HTML
7
star
27

terraform-azuread-github_oidc

Terraform module to create an Azure AD application, service principal, and federated identity for GitHub-based OIDC authentication.
HCL
7
star
28

terraform-tfe-org-factory

Terraform module to create Terraform Cloud organizations, workspaces, and teams.
HCL
6
star
29

Vault-on-ACI

An implementation of HashiCorp Vault on Azure Container Instances
HCL
6
star
30

Configure-and-Manage-Key-Vault

Exercise files for my Pluralsight course Configure and Manage Key Vault, part of the AZ-500 certification prep.
PowerShell
6
star
31

hashitalks-2023-boundary

Demo code for HashiTalks 2023 Boundary Presentation
HCL
6
star
32

tfc-vault-oidc-example

Example of using workload identity in Terraform Cloud with Vault
HCL
5
star
33

AWS-SysOps-Admin-Assoc-Troubleshoot-Network

Companion exercise files for my Pluralsight course
Shell
5
star
34

Terraforming-with-GitHub-Actions

GitHub repo for my Festive Tech Calendar entry
HCL
4
star
35

terraform-vm

Shell
4
star
36

Configure-Security-Policies

Code examples to accompany the Pluralsight course.
Shell
4
star
37

github-simple-oidc-testing

A simple example of using OIDC with GitHub Actions and Microsoft Azure
HCL
4
star
38

AWS-SysOps-Admin-Assoc-DNS-and-Content-Delivery

Exercise Files for the associated Pluralsight course
Shell
4
star
39

Networking-in-Public-Cloud-Deployments

Code examples for the Networking in Public Cloud Deployments lecture - March 2020
HCL
4
star
40

env0-app-example

HCL
4
star
41

vault-fridays

Shell
3
star
42

tt-folder-example

Folder based multi environment example
HCL
3
star
43

tt-repo-example-prod

Example terraform deployment using repositories per environment
HCL
3
star
44

tt-branch-example

Branch based multi environment example
HCL
3
star
45

terraform-vdc-demo

HCL
3
star
46

terraform-mmsmoa-2019

Demonstration example files for the MMS MOA conference
HCL
3
star
47

dot-net-liverpool

Demo files for Dot Net Liverpool talk
HCL
3
star
48

terraform-azuread-serviceprincipal

Terraform module for creating service principals in Azure AD.
HCL
3
star
49

github-oidc-azure-setup

Setup repository for configuring GitHub Actions and OIDC
HCL
2
star
50

AzureSpeechToTextPowershell

PowerShell Scripts for Azure Speech to Text API
PowerShell
2
star
51

vault-aws-auth

Demo of using AWS IAM auth with HashiCorp Vault
2
star
52

Monitor-Security-with-Azure-Security-Center

Exercise files for my Pluralsight course of same name.
PowerShell
2
star
53

Plan-and-Implement-User-Environments-and-Apps-on-AVD

HCL
2
star
54

Plan-and-Implement-Identity-and-Security-on-AVD

Scripts for my Pluralsight course
HCL
2
star
55

Monitor-and-Maintain-an-AVD-Infrastructure

Repository for my Plurasight course of the same name
HCL
2
star
56

github-oidc-testing

Testing repo for GitHub OIDC to Azure AD
HCL
2
star
57

Configuring-Azure-VM-Clusters-Using-Terraform

Public repository for my A Cloud Guru course
HCL
2
star
58

terraform-cloudinit-native

A Terraform module to generate cloud init file natively without a provider plugin or data source.
HCL
1
star
59

env0-ci-example

Example code for a CI process involving env0
HCL
1
star
60

ansible-playbook-nginx

Ansible playbook to install NGINX locally
Jinja
1
star
61

terraform-azurerm-swapodcast

A Terraform module meant to deploy an Azure Static Web App to host a podcast.
HCL
1
star
62

tt-repo-example-dev

Example terraform deployment using repositories per environment
HCL
1
star
63

vscode-mms2019

Code examples for the VS Code presentation at MMS MOA 2019
JavaScript
1
star
64

IaCTerraformDemo

Files for an Infrastructure as Code demo using Terraform
HCL
1
star
65

env0-terraform-tutorial

Repository to accompany the blog post
HCL
1
star
66

tt-repo-example-staging

Example terraform deployment using repositories per environment
HCL
1
star
67

functional-iac-testing

HCL
1
star
68

azure-philly-aks

Examples for the Azure Philly Meetup
1
star
69

TFSVMDeploy

PowerShell
1
star
70

azure-advent-aks

HCL
1
star
71

terraformProjects

Various Terraform Projects I am kicking around
HCL
1
star
72

AWS-UG-Terraform

HCL
1
star
73

hashiconf-global-opa

Example code for using OPA with Terraform.
Open Policy Agent
1
star
74

Operating-Azure-Stack

Exercise Files to go with the Pluralsight Course
PowerShell
1
star
75

robusta-on-aks

Demo to install Robusta on AKS with Prometheus
HCL
1
star
76

terraform-azurerm-networkdatasource

Data source module for Azure Networking
HCL
1
star
77

aks-storage-testing

FIO testing for different storage types on AKS
Shell
1
star
78

azuredevops-pipeline-agent

Shell
1
star
79

vault-tfc-approle

Example of using AppRole Auth Method with Terraform Cloud
HCL
1
star
80

kthw-terraform-multicloud

Terraform scripts to deploy the necessary infrastructure to do Terrraform the Hard Way on multiple clouds.
HCL
1
star
81

Configuring-Security-Services-and-Policies-in-Microsoft-Azure

Repository for my Pluralsight course
PowerShell
1
star