So how can we deploy an application across multiple regions consistently and even multiple accounts
for this, you can use tax in confirmation.
So does Texas allow you to create updates or delete stacks across multiple accounts and multiple regions
with a single operation?
The administrator accounts has access to create stack assets and then trusted accounts, allow the administrative
accounts to create update and delete stack instances that are cleaved from this Texas.
So when you update this Texas and the administrator accounts all the associated stacks instances are
updated throughout all the accounts and region.
We'll see this in hands on Don't Worry.
And you have the ability to set a maximum amount of concurrent actions on the targets as a number or
percentage.
And you also have the ability to say the number of failures you can tolerate as a number or a percentage.
So this is extremely helpful.
Once you start having a global architecture and you want you have global confirmation templates deployed
in multiple regions and multiple accounts.
So let's have a go at how this works.
So let's go into cloud formation and confirmation.
We've seen all there is just about stocks, but what about stack sets?
And those tech sets are right here and we have never used them.
So let's go ahead and use those right now.
But first, we need to do some informations.
So as I said, there was an administrator accounts and then there were some trusted accounts.
And so we need to create the Emeril's that would be necessary for these accounts to exist.
And so, thankfully, this documentation page has some information, templates that will allow us just
to do that.
So here is a cloud formation templates and I'm going to copy the link address.
And this will create an admiral named AWB Confirmations Tax Administration Road.
So let's assume that we have the administrator accounts and we'll create a stock.
And I'll say this is here next.
And I'll say administrator accounts, uh, confirmation stocks, sets.
OK, and I'm going to click on Next Next, and finally, everything looks good, I'm going to acknowledge
that this will create I am rolls and click on Create Stack.
So this goes ahead and creates the first I am really needed.
And then the Tresidder account is also going to be the same account as we have here because we actually
need this accounts to be doing the multiregional stuff.
We don't do multi account in this Hentzen just multi region.
And so for this we need to go to a council hours and we can just copy this, uh, templates, OK, and
then we'll be prompted to provide the name of the initiative accounts on which we have a trusted relationship.
OK, so let's have a look at this so we'll have the execute on this role.
So I'll refer to this page.
Everything is being created right now, so just wait a second.
And now the is complete.
So we have a resource being created and that's an IBM roll that does everything we need to do.
And so we'll go ahead and create a new stack and I'll put the you are for the stack set execution roll
click on next.
And here we need to put a perimeter, which is the administrator account ID.
So this is where we need to provide our own idea.
But I think I could have this from here.
Here we go.
I'm just going to be the ID.
Um, I'll just copy this entire thing and then get the idea of it.
So here we go.
We have the administrative account ID and this is the accounts where this tax will be created.
And this one, I'll say target accounts.
I am role StockTwits, OK, and click on next, click on next and scroll down, this will create another
I am role, so that's perfect.
And click on Create Stack.
So that's wait for this to be over.
OK, so this is created and now if I go back to my texts, I should be able to create my first texts.
So let's talk about a problem that we have set.
For example, we go to something and you may remember that we did come to this course.
And so if you go to config, we can see that we can track all the resources within my region and then
use one.
But if I go to, say, USD one, for example, in this example, well, conflict is not configured.
And if I go to U.S. east to well, config is not configured either.
And so what I'm trying to show you here is that I would like config to be deployed in every single region
that I'm operating in.
Right.
So what I'm going to do is use a simple template in here because the template is already created for
me.
But this is just a normal cloud formation templates that we have in here.
And I'm going to choose the templates enable FWC config.
If you're curious, you can go to this URL and see what it creates.
It creates just a bunch of resources that are needed to create a configuration to track the resources
within the accounts.
So let's click on next.
And I'm going to here in this technium say, enable FWC config.
And this text description is the exact same.
And now for the Panetoz.
So include global resource types.
Yes, uh, resource types, all notification email, non topic error and non um, new topic.
Sorry, the original name generated frequency 24 hours and all supported all resource types.
Yes.
So we don't touch any of these perimeters.
They all work just fine.
I'll click on next.
And here we should say the execution name.
So this Adewusi information stack set execution roll is the one we have created directly from the cloud
formations text from before.
So let's go to roles and we look for this role.
And right now it doesn't exist because I haven't refreshed.
Here we go.
It exists.
Here it is.
And so it was going to use this role to execute on the accounts excellence.
Click on next.
And now I can say in which accounts do I want to deploy this?
And so I can deploy in different accounts or different or organizational units.
If I'm using a service organization to manage my accounts, then I'm just using the council right now
and I'll specify the account number I'm currently in, so I'll just copy this and extract the account
number.
So here is my account number and I could have multiple, um, account numbers by just having commas
so I can just have many commas and have many different accounts.
But for now I'll just have one because we want to deploy only within my accounts.
And then for specific region I'm going to say, OK, the to use east northern Virginia and deployed
to uh, U.S. uh I'm going to say, uh, EU London.
I'm not deploying to my region, Ireland, because I don't know if that's going to conflict with the
configuration I've already done.
So I know these two.
I have enabled soldiers anybody's too right now.
So you can add all regions.
You can remove all regions, you can select the regions you want.
You're free to do however you want.
And then we can say how many accounts we can have at a time.
So we're saying, OK, one at a time.
That means that's only one of these two regions will be deployed first.
So maybe Northern Virginia and then when it's done, it will move on to the London.
And if we have fault tolerance, if we say zero, that means that if one of those fails, then everything
fails and rolls back.
Whereas if we have a no saying one, we allow one region to fail.
So we'll just say zero because we don't any failures.
And click on next, OK, we can review everything.
So this is a normal confirmation template that's just going to be deployed in all the regions right
here specified here in this accounts.
And so, yes, I'm good to go and click on submits.
And here we go.
So this is going on and now we can look at the operation, so the creator is running OK, and we can
look at the stack instances, which is OK, where the stack is being created.
And right now it's outdated.
So it's user initiated operation.
So let's see what happens.
Um, if we go to Texas info.
OK, so right now this is being created, so this is why this is outdated, so we just need to wait
a little bit, see what we can do.
In the meantime, though, is go to USD one and see if the stock is being created over there.
So, I mean, if you use just one and I'm going to Stacks and we can see this, there's this tech named
Stack Sets and the crate is complete.
So this stock creation has worked.
And if I went into config console for this region, I should see some configuration and hopefully everything
will be configured already.
So let's have a look get started and the configuration might already be included.
So this was this switch a little bit.
Here we go.
So we can see from the dashboard that the resources are currently being discovered.
So that mean that this tax has been applied in USD one and because USD one has now finished its current
and now the other region is getting on with the rollout of the confirmation template.
And that's because I choose a configuration, if you remember, of one region at a time for the maximum
amount of concurrent operations.
So let's just wait for this to be over.
And now they're both current and my endless config enable has been done on these two regions.
But I can do something really cool.
I can add new steps to success and say, OK, use the same account, so use the same account number.
But I would like you to add a region and please add Singapore, OK?
And I'll just say next and we'll have the same parmeter so we'll click on next and everything looks
good.
We submit this and here we go.
Now we're going to have a third stack instance being created in AP Southeast one.
So it's really easy to do multiregional deployment and multi account deployment directly from this UI.
Similarly, you could, um, uh, you can delete stack from the stack sets so you can say which regions
and which accounts you want to delete stack from.
So that could be really handy and you could altogether delete this stack said we shall delete all the
stacks from the stack sets obviously.
And when you think about it, the use cases for Stuxnet are huge.
I mean, any template that works in multi region will work as a Stuxnet.
So it's quite powerful because this is the same confirmation template.
But if you look at the simple templates of what we may want, you have enabled by this feature.
They're really nice, for example, enabling Israel in all the regions.
This is done with one Stuxnet config guard duty and then maybe won't you add configure rules like Route's
account, MSA enabled real Crossrail enabled IP attached and encrypted volumes as rules that are clear
on all the config that we have created in all the regions.
So those are just some examples that you can have with Stuxnet.
But any time you want to deploy a confirmation template across multiple regions, then you would need
to use tech assets.
And then so you see multiple operations, multiple things are done.
And so when we're ready, we click on action, delete Stuxnet and this will delete everything.
And so we need to delete all the stacks from the stack sets.
So all the regions and my accounts.
Here we go.
So this is added.
And now I can go ahead and delete, uh, three at a time, for example.
And so we go next and then click on Submit.
So here we go now, the operation to delete all this text that is running.
And now this operation has succeeded and what I can do next and see that I have zero instances and now
I can go ahead and delete this text altogether.
So that's it for this lecture on success.
Whenever you see global deployment for cloud formations, let's hope that was helpful.
And I will see you in the next lecture.