From the course: Learning Terraform
Unlock this course with a free trial
Join today to access over 25,400 courses taught by industry experts.
Modularize - Terraform Tutorial
From the course: Learning Terraform
Modularize
Now that we have variables pulled out of our code, we just about have a module, but there are a couple of things left that we should add. First, it would be nice to have some output. Let's look in main.tf and see if there's anything obvious there. There's not a lot that we'd want to output since most of this is things that we're specifying. But one thing that I think would be useful to add is outputting the DNS name that's generated for the ALB so that we can easily just go to that web page. In order to find out how to do that, go over the Terraform registry and search for ALB. And it should come up with this module. So that's this one, Terraform AWS modules ALB. and just scroll down and click on Outputs. And this is actually the parameter we're looking for, DNS name. So that's the DNS name that gets generated and attached to our load balancer. So that's pretty easy to remember. Let's go over to Main…