1
00:00:00,240 --> 00:00:01,100
So outputs.

2
00:00:01,110 --> 00:00:01,910
Let's talk about outputs.

3
00:00:01,920 --> 00:00:05,410
And that's actually a very popular exam question so pay attention.

4
00:00:05,550 --> 00:00:09,610
The output section is optional but we can declare optional outputs.

5
00:00:09,810 --> 00:00:16,230
And if we export these outputs we'll be able to import their values into other stacks and by stack I

6
00:00:16,230 --> 00:00:20,490
mean confirmation templates so you can start linking your cloud formation templates.

7
00:00:20,550 --> 00:00:24,460
We can also view the outputs in the areas console or using them as Seelye.

8
00:00:24,510 --> 00:00:31,620
So it allows us to quickly retrieve the value of an outputs it straight from using the the UI in terms

9
00:00:31,770 --> 00:00:33,270
of example.

10
00:00:33,300 --> 00:00:39,390
For example you can have a network cloud formation template and then you would export outputs that would

11
00:00:39,390 --> 00:00:46,970
be for example the VPC I.D. and the subnet I.D. and you would reuse those into other confirmation templates.

12
00:00:47,040 --> 00:00:53,430
And so it enables to do a cross tech collaboration where you let the experts handle their own part.

13
00:00:53,430 --> 00:00:59,720
So the VPC and the subnet and you as an app developer you just reference these values out of the box.

14
00:01:00,180 --> 00:01:05,040
Something as should know though is that if you start using the cloud formation outputs and they start

15
00:01:05,040 --> 00:01:10,380
being referenced from another cloud formation tax stack you can not delete a stack that still has outputs

16
00:01:10,380 --> 00:01:12,050
being referenced somewhere else.

17
00:01:12,090 --> 00:01:13,890
So it's just something to note.

18
00:01:13,950 --> 00:01:19,560
Now if we look at an example of the outputs in this one we are creating a SSD such security group as

19
00:01:19,560 --> 00:01:24,170
part of the templates and so we export that value as an output.

20
00:01:24,350 --> 00:01:25,050
Okay.

21
00:01:25,110 --> 00:01:31,230
And basically other templates will be able to get the value of that security group.

22
00:01:31,740 --> 00:01:33,420
So the syntax is pretty easy.

23
00:01:33,420 --> 00:01:39,150
We have the output section right here and we have the name of the security group and we have a description.

24
00:01:39,150 --> 00:01:41,600
So the SSA actually carried a group for our company.

25
00:01:41,650 --> 00:01:46,560
Here is the value so we provide a reference of the security group where that was created within the

26
00:01:46,560 --> 00:01:51,150
resources and then we have to specify this export block right here.

27
00:01:51,150 --> 00:01:51,360
Okay.

28
00:01:51,360 --> 00:01:52,430
This is an optional block.

29
00:01:52,440 --> 00:01:57,450
If you don't specify it then the value does not get exported and it will not be able to be imported.

30
00:01:57,450 --> 00:02:04,110
So when we specify the export value we can say okay this value this SSL security group I.D. is going

31
00:02:04,110 --> 00:02:08,100
to be exported as the name SSA each security group.

32
00:02:08,100 --> 00:02:09,660
So now how do we import that value.

33
00:02:09,660 --> 00:02:13,980
Well using a cross tech reference and so we'll create a second template that averages that security

34
00:02:13,980 --> 00:02:18,240
group and for this we'll use the F an import value function.

35
00:02:18,240 --> 00:02:24,630
Interesting function and we can't delete again the previous tag until all this time will be deleted.

36
00:02:24,630 --> 00:02:29,610
So if we look at this little snippet of code right here we can see that for the security groups at the

37
00:02:29,610 --> 00:02:36,240
very bottom there is a shorthand syntax for import value and then we reference the exact same name as

38
00:02:36,240 --> 00:02:39,930
before called SSA each security group.

39
00:02:39,930 --> 00:02:45,260
So just a reminder before we exported the value as SSA each security group.

40
00:02:45,360 --> 00:02:49,880
And here we import the value SSA each security group.

41
00:02:50,040 --> 00:02:56,490
So you know um outputs and exports are very very popular question at the exam especially if they start

42
00:02:56,490 --> 00:03:00,320
asking you how do you link cloud formation templates or which you the value from one to another.

43
00:03:00,420 --> 00:03:01,470
So you should know about it.

44
00:03:01,500 --> 00:03:04,980
You should know about the syntax and you should know about the import value function.

45
00:03:05,100 --> 00:03:06,170
So I hope that was helpful.

46
00:03:06,240 --> 00:03:07,680
And we'll see you in the next lecture.
