From the course: Introduction to Terraform on Azure
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Reference and deploy compute module
From the course: Introduction to Terraform on Azure
Reference and deploy compute module
- [Instructor] I hope you were able to follow along with defining the compute model in the previous videos. It's time to update our root model. So in my Explorer view, I'll select the main.tf and then scroll down and let's highlight everything after the provider block. So from the locals, all the way down, and delete these entries. Now we need to create a model block. So create a new line and type model and the name of this model will be compute. Enter the new line, and in here, we'll define the source of the model. So ./models/compute. Now let's create a new line and we need to define all the variables that is needed by this model. For the project name, I'll use projkpi. You can use any name you would like. The model also needs a team_name variable, so we would use var.team_name. We also need to define environment, var.environment, and it's a defined location, which is var.location. Address_space = var.address_space. Subnet_prefixes. Var.subnet_prefixes. Then the vm_count…
Contents
-
-
-
-
-
-
Why use modules?5m 57s
-
(Locked)
Defining variable for compute module7m 47s
-
(Locked)
Defining compute infrastructure11m 6s
-
(Locked)
Reference and deploy compute module10m 42s
-
(Locked)
Defining Azure SQL database module10m 18s
-
(Locked)
Defining an Azure Web App module13m 49s
-
(Locked)
Deploying our modules6m 6s
-
(Locked)
Destroying our provisioned resources2m 18s
-
-
-