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.
Deploying our modules
From the course: Introduction to Terraform on Azure
Deploying our modules
- [Instructor] We are back and ready to define the outputs for the database module. Let's see how it's done. So I'll right-click on database, select New File and type outputs.tf. And I'll just go ahead and paste my code. Here we have the resource group name. We have the server name output, which is referencing the server.main.name. We have the database name, which is referencing database.main.name. And we also have the connection string, which is Server, referencing the fully qualified domain name of the SKL server. The Database would reference the database.main.name. The User Id would reference a var.admin_username and also the Password. So let's save this. And you can see we have some errors in our main.tf. That's because we need to define these variables in the variables.tf. So go to your variables in your root directory. And in there I'm going to paste my variables for database_password, which would have a description, a type, sensitive set to true, and the default password. We'll…
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
-
-
-