OK, so next, let's learn about depends on then we'll open the file 12 depends on.
So this file is interesting.
Let's get started.
So we have a mapping and we've seen that things before.
Mappings map, for example, regions to Amyas.
So this is a way of an old way of finding a way to map origination Šamaš.
So, for example, if you run this template from each one, you'll result this value if you go from
us west, one year of that value and so on.
And then we have a resource, it an easy to instance and for the image Adisa for the Amedee, then we
use a find in map function, intrinsic function.
And so this references this mapping right here.
And we're saying, OK, in the mapping named AWG Region Arch to amay, which is the name of this one,
then you need to use the reference database region.
So this is a pseudo Panetoz and look at the value of M 64.
So if I run this within us, one is going to say, OK, here, then is going to go down to us.
One then is going to get onto to the key VM 64 and the value is going to be this.
So this is going to be the result of this finding a map function.
So we have an instance and is going to pick up an amedia from this mapping.
And then there's this thing called Depends on and this is what I want to draw your attention on from
this lecture.
So depends on is a way to say that this resource right here, this Ishita instance, should not be created
until my database has been created.
And this is what the depends on me.
So if I had removed it, for example, the two instance and the database would be created at the same
time.
And for example, if I had an application starting on my E instance that tried to connect to the database,
well, it would not work.
Right.
So by using this depends on mechanism, then we can say that to confirmation that you should only create
this Ishita instance after the might be the earliest instance has been successfully created.
So let's try it out and see how that works.
So we'll go to stacks, create a stack, upload templates and we'll use the template No.12 depends on.
And then I click on next and you can take a lot of time, but Dimo depends on because creating a database
is very, very long.
But we'll just observe the beginning of the behavior.
So let's go ahead and create the stack.
And now this task gets in, create in progress.
Right then I'll refresh and the first thing that gets created is my DB.
And so as I refresh, my DB has a resource creation initiated, but my Ishita instance is not being
created at all.
And so I have to wait.
I have to wait a very, very long time actually until the my DB will be created.
So that's the easy to instance will get creating that.
And similarly, if I went and waited for the entire thing to happen and I deleted my resources, then
this would be deleted first and then this would be deleted second.
So by using the depends on, we can introduce some relation between each instance and my DB until confirmation
which one we want to happen first.
So that's something you need to remember if it comes up at the exam.
All right.
As far as this tack is going to take forever if I wait.
But as you can see, the issue in essence is still not being created.
So I'll go ahead and delete it right away.
All right.
That's it.
I will see you in the next lecture.