Hi and welcome to this lesson.
This is going to be a two in one.
You're going to learn about outputs an attribute at the same time.
So sticking with our example in the variables file.
What are we to do now?
Is she outputs?
We've also complete we have output here.
So when I click on that and we give it a name, some nickel with my output.
And then we give it a value.
And one of the main advantages of output is we can get details about the resources we've created.
So one example might be the VPC I.D..
Skipper.
It follows this former.
It's for resource name NWS, Underscore VPC, dot the name.
In this case, it's my VPC.
And then the attribute we want to access.
Now we've also complete plugin.
It gives me a few options, but one I'm after is I.D. to find out more about the attributes we can access.
We can find them on the terrible documentation.
And here we have the attribute references and what we're using here is I.D. So now we go back to our
code.
This is the key thing.
When we brought TerraForm apply, we'll get the value of the I.D..
The reason it won't work in plan is because we haven't actually created the VPC.
It's a computed value.
Suomi run terraformed apply once it's completed.
It will then show us the value of the VPC I.D..
But let's go ahead and rename his output to VPC Idee.
So we have a bit more context.
And now let's go ahead and run its Kichwa in scripts terminal.
I'm already inside the Variables folder Sunlight's Run Terraformed Plan.
So the input name of the VPC, some recall this input VPC.
And, you know, it's we no output pass because we haven't created the VPC yet, us go ahead and run.
Terrible apply.
We'll set about to input test.
And so, yes, go ahead and create it.
As we see here, the VPC I.D. has been created and it's now been output's.
So, again, we've covered two things in this war.
Output saw how we use it and how we access attributes.
And it's a really key thing in tearful.
It's a resource type, the name we've given it and the attribute.
Now, let's go ahead and run.
Terrible.
Destroy.
And so, yes.
Awesome.
And there we go.
That wraps up this lesson.