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

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