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

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