From the course: Introduction to Terraform on Azure
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Defining an Azure Web App module
From the course: Introduction to Terraform on Azure
Defining an Azure Web App module
- [Instructor] I hope you were able to follow along in the previous video to create a database model. Now, let's also create a web app model. So in your terminal, run this command, mkdir -p modules/web-app and Enter. Now, in the Explorer view, let's right click on web app and select New File, and let's name this variables.tf. I'm going to do the same thing I did in the previous video. So, go to variables in database module and let's copy from the variable project_name all the way to location. So, highlight and Control + C to copy, and back in my web-app's module variables, I'll paste this and let's confirm we have the project_name, environment name, which contains dev, staging, or prod, and the location. So let's create a new line, and now we'll create a variable for app_service_sku, so app_service_sku. And in here, we'll have the description, which will be "App service plan sku" and the type will be string, and I'll define a default as F1. Let's create another variable…
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
-
-
-