Hi, welcome to this lesson.
You're going to learn about multiples and how we work with outputs.
So I mentioned in the last lesson that this is a really key concept, and especially if you work with
third passing modules, you may have resources and attributes you need to access.
Let's say, for example, you using the VPC module.
Now you've got an easy two instance you need to create.
You need to take the value from that more to Impulse's somewhere else.
No way this is done is quite interesting.
The terrible what we do is we set outputs inside the module that have the attributes set.
It's a little bit confusing your head around.
So let's jump into it.
Now let's go over to easy to see if and to do this.
We're going to set up an outputs.
We give it a name so we could say instant on the school I.D. and the value.
It's going to be equal to eight of us unschool instance, dot the name.
Cities can be easy to be.
We're going to use these dot I.D..
Now, let's quickly recap on this.
This could be any of her attribute.
We want to use, but if we even need to use something we set up in a multiple.
This is how we would access it.
So you have a look on the documentation.
I want to show you very shortly.
Terrible registry.
You'll have inputs just covered in the other lesson.
And anything you get out of it effectively is an output.
So they have VPC for you.
And to get any details out of that, what we've done is they've set up outputs inside and they just
reference those.
So let's have a go to self.
So let's go back over to Mindil T.F. Fearful once again outputs of a module.
You have to create a second output.
So Cobus multiple on the school output and in in-service value equal to.
And it's gonna be multiple dots.
But you'll know this case is easy to watch, you dots and the name of the outputs.
In this case we said it's sidedly, so let's copy pasted it.
In this example here.
This would be how you would access the instance I.D., but it applies to any of a terrible resource
not going to use an output per say.
But imagine we need to pass this in to the IP instead of an instance idee.
It was an instance nine.
Well, we do exactly the same.
We would set an output in the module, which would output the instance nine.
Preventing access it inside here, we would use module to easy to module dot and which is.
Name.
We would use this line here.
So now let's go ahead.
And Romney's so good to see you getting to terminal.
Let's run.
Terrible.
Apply.
Excellent.
And so, yes.
Excellent.
And we now have the idea of the instance so we can do is go ahead and.
Terrible.
Destroyed.
Ambulance.
Yes.
And against quickly recap what we set up, so access any attribute or any value from anything we've
created inside the module.
We have to create an output and then to access that attribute the resource we've created inside the
module.
We have to create an output and to access the outputs.
We would use Module Dalt, the module name and Dalts the output name.
That wraps up was less than what we're gonna do next is have a look.
That's terrible registry.
I'll look forward to seeing you in voteless.