WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.200 --> 00:00:10.100
In this final video of Section 3 you're gonna put together all the

1
00:00:10.100 --> 00:00:13.200
 AWS and terraform knowledge of learned thus far to create your

2
00:00:13.200 --> 00:00:16.200
 lab. This setup will serve you for the remainder of this course.

3
00:00:17.700 --> 00:00:20.400
Okay, there are a few things we need to discuss in

4
00:00:20.400 --> 00:00:23.800
 do before you can create your infrastructure AWS. The

5
00:00:23.800 --> 00:00:27.000
 first thing I assume you've already installed terraform in

6
00:00:26.100 --> 00:00:29.800
 the AWS CLI. You would need both applications to

7
00:00:29.800 --> 00:00:32.800
 proceed. If you have not done so already, please

8
00:00:32.800 --> 00:00:35.800
 pause the video and go do that. Now the two

9
00:00:35.800 --> 00:00:38.200
 download links are in the course prerequisites.

10
00:00:38.700 --> 00:00:41.200
We will use terraform to create our lab so you

11
00:00:41.200 --> 00:00:44.300
 can focus on building a solid foundation without having to worry

12
00:00:44.300 --> 00:00:46.300
 about knowing everything right from the beginning.

13
00:00:47.300 --> 00:00:50.300
The AWS CLI is a command line application that allows

14
00:00:50.300 --> 00:00:53.300
 us to communicate with AWS. We will use

15
00:00:53.300 --> 00:00:56.900
 this to configure our axis keys that we're going to do later on and

16
00:00:56.900 --> 00:00:59.100
 we're going to use AWS CLI and later videos.

17
00:01:00.300 --> 00:01:03.100
Next I assume you have cloned the git repository that is

18
00:01:03.100 --> 00:01:06.400
 in the course prerequisites this repository contains all

19
00:01:06.400 --> 00:01:08.600
 the terraform files needed to create your lab.

20
00:01:09.600 --> 00:01:12.900
To be able to run terraform and the AWS CLI

21
00:01:12.900 --> 00:01:15.700
 you need to have access to aws's apis

22
00:01:15.700 --> 00:01:18.400
 AWS users can create access keys that

23
00:01:18.400 --> 00:01:21.600
 give them permission to do so, you will create access keys

24
00:01:21.600 --> 00:01:24.300
 to populate a local credential file, which is

25
00:01:24.300 --> 00:01:26.900
 read by terraform and AWS CLI.

26
00:01:27.800 --> 00:01:30.500
You will need an SSH key pair so you

27
00:01:30.500 --> 00:01:33.200
 can connect with your Linux hose for brevity. I

28
00:01:33.200 --> 00:01:36.100
 provided a simple script in the git repository that you can

29
00:01:36.100 --> 00:01:39.400
 use to set these up after all that setup is

30
00:01:39.400 --> 00:01:42.300
 complete. You will finally get to run a few terraform commands.

31
00:01:42.300 --> 00:01:45.700
 They are in it plan and apply these

32
00:01:45.700 --> 00:01:48.600
 commands when successful should create

33
00:01:48.600 --> 00:01:49.100
 your lab.

34
00:01:49.800 --> 00:01:52.400
Lastly we will verify your ec2 instance was

35
00:01:52.400 --> 00:01:56.100
 created and that you can access it over SSH. Let's

36
00:01:55.100 --> 00:01:56.600
 get started.

37
00:01:57.600 --> 00:02:00.500
Okay. So here we are back in the AWS console

38
00:02:00.500 --> 00:02:03.400
 and instead of going to the normal places. We've

39
00:02:03.400 --> 00:02:06.500
 been going to we're gonna go up here to the top right corner, which is

40
00:02:06.500 --> 00:02:09.400
 your username and here are mine's obviously the Linux for

41
00:02:09.400 --> 00:02:10.300
 cloud devops course.

42
00:02:11.100 --> 00:02:14.700
Click on that and then in this drop down here, you're gonna have a security credentials

43
00:02:14.700 --> 00:02:17.000
 link go ahead and click on security credentials.

44
00:02:22.200 --> 00:02:25.900
Okay. So here we are in the root user security credentials page

45
00:02:25.900 --> 00:02:28.400
 as you can see the first thing you see is this big

46
00:02:28.400 --> 00:02:31.900
 red exclamation point like no MFA for

47
00:02:31.900 --> 00:02:34.200
 root user and this is great

48
00:02:34.200 --> 00:02:37.500
 advice. There should be MFA activated through user. If

49
00:02:37.500 --> 00:02:40.700
 this was not a lab course, I

50
00:02:40.700 --> 00:02:43.300
 would tell you this exactly what you should do. So if

51
00:02:43.300 --> 00:02:46.100
 you're gonna keep this account after this course is done,

52
00:02:46.100 --> 00:02:49.300
 please add MFA to so you

53
00:02:49.300 --> 00:02:52.700
 can secure your account the best best way possible, but we

54
00:02:52.700 --> 00:02:54.600
 can proceed now with the warning out of the way.

55
00:02:55.400 --> 00:02:58.600
So I want you to scroll down until you see access keys.

56
00:02:58.600 --> 00:03:01.400
 And so this is we're going to create it creates two keys

57
00:03:01.400 --> 00:03:05.000
 now access key and a secret axis key and we're

58
00:03:04.200 --> 00:03:07.200
 going to use both of those later on in the terminal.

59
00:03:07.200 --> 00:03:10.600
 But for now, let's go ahead and create click create

60
00:03:10.600 --> 00:03:13.400
 access key. Well, we have another warning that

61
00:03:13.400 --> 00:03:16.400
 says root users access keys are not best practices or

62
00:03:16.400 --> 00:03:19.400
 recommended and while again this is good advice,

63
00:03:19.400 --> 00:03:22.200
 but because of the course the nature

64
00:03:22.200 --> 00:03:25.200
 of this course and this being a lab it is

65
00:03:25.200 --> 00:03:28.500
 okay that we're gonna do this now I after

66
00:03:28.500 --> 00:03:31.200
 this is over with the courses over with feel free

67
00:03:31.200 --> 00:03:32.600
 to delete the access keys.

68
00:03:33.300 --> 00:03:36.300
Or just deactivate them or just close this

69
00:03:36.300 --> 00:03:39.300
 AWS account as well. That way you can keep yourself

70
00:03:39.300 --> 00:03:42.300
 as secure as possible. The reason why it's not

71
00:03:42.300 --> 00:03:45.300
 the greatest idea is because your root user

72
00:03:45.300 --> 00:03:48.400
 has full access to billing and to be able to create your

73
00:03:48.400 --> 00:03:51.600
 account. I mean to close your account or change your account so you

74
00:03:51.600 --> 00:03:54.200
 don't want those keys falling into someone else's hands because they could do

75
00:03:54.200 --> 00:03:57.300
 some damage. But like I said, we're okay doing that

76
00:03:57.300 --> 00:04:00.200
 here for our use case if you wanted to do it

77
00:04:00.200 --> 00:04:03.200
 the correct way or best practice way if you if you

78
00:04:03.200 --> 00:04:06.400
 will is you would create a group you would assign that

79
00:04:06.400 --> 00:04:09.100
 group permissions for whatever task that needs to

80
00:04:09.100 --> 00:04:12.600
 be done in this case would be to create the infrastructure that terrible needed.

81
00:04:13.200 --> 00:04:16.500
And you would then create a user inside that group

82
00:04:16.500 --> 00:04:19.200
 and let's call that user terraform us or whatever and

83
00:04:19.200 --> 00:04:22.400
 then for that terraform user you would then create the access

84
00:04:22.400 --> 00:04:25.300
 keys and that would be a little bit safer way. That

85
00:04:25.300 --> 00:04:28.000
 way you're limiting the destruction that those access keys can do.

86
00:04:28.400 --> 00:04:31.100
 There's only there the scoped much closer, but all right

87
00:04:31.100 --> 00:04:33.500
 with all that out of the way go ahead and click I understand.

88
00:04:35.100 --> 00:04:36.700
And then click create access key.

89
00:04:37.700 --> 00:04:41.000
Okay, so it brings us to this page showing us. Hey your access

90
00:04:40.200 --> 00:04:42.500
 keys are done. Here you two keys.

91
00:04:43.200 --> 00:04:43.300
so

92
00:04:44.400 --> 00:04:47.100
There's two ways you get the keys. You can view them right now in the

93
00:04:47.100 --> 00:04:51.100
 page and you'd have to copy and paste or you can download CSV

94
00:04:50.100 --> 00:04:53.200
 down here download the CSV. It's

95
00:04:53.200 --> 00:04:56.100
 much easier. You can delete the file off your computer later on

96
00:04:56.100 --> 00:04:59.400
 but you've only got one shot here to see your secret access key. So

97
00:04:59.400 --> 00:05:02.200
 if you show it, you copy it somehow your copy paste buffer

98
00:05:02.200 --> 00:05:06.300
 gets messed up. You can't see that key ever again. You'd have to delete this

99
00:05:06.300 --> 00:05:09.700
 key and create new ones. So, all right download them.

100
00:05:10.700 --> 00:05:13.800
All right. So we're done in here. So we're

101
00:05:13.800 --> 00:05:16.400
 gonna use everything that we're gonna use going forward we're gonna

102
00:05:16.400 --> 00:05:19.100
 do is in the terminal. So let's head over to the terminal now.

103
00:05:19.700 --> 00:05:22.200
All right. So here we are on the terminal. So the

104
00:05:22.200 --> 00:05:25.300
 first thing we're gonna do is we're gonna use those

105
00:05:25.300 --> 00:05:28.400
 access Keys. We just created to set up our credential file and

106
00:05:28.400 --> 00:05:29.500
 our access for terraform.

107
00:05:30.200 --> 00:05:31.100
So if you recall.

108
00:05:32.300 --> 00:05:35.400
The file in my case was called root c a root

109
00:05:35.400 --> 00:05:38.100
 key dot CSV should be the same in yours if

110
00:05:38.100 --> 00:05:39.000
 you did it on the root user.

111
00:05:40.100 --> 00:05:43.600
So as you can see here, it's just a normal CSV file. We have

112
00:05:43.600 --> 00:05:46.400
 the you know the key here and then the secret

113
00:05:46.400 --> 00:05:47.400
 access key here.

114
00:05:48.600 --> 00:05:51.400
So to write this configuration file

115
00:05:51.400 --> 00:05:54.800
 out we could just do it by hand or there's a wizard

116
00:05:54.800 --> 00:05:57.300
 way that you can use with the AWS CLI. And

117
00:05:57.300 --> 00:06:00.300
 since we're gonna be using this tool later on I thought this would be good introduction for

118
00:06:00.300 --> 00:06:00.500
 you.

119
00:06:01.500 --> 00:06:04.600
So AWS command always starts with AWS.

120
00:06:05.600 --> 00:06:08.400
And there's a subcommand called configure and this

121
00:06:08.400 --> 00:06:11.500
 is what we're going to use. So go ahead and type those two and then

122
00:06:11.500 --> 00:06:11.900
 hit in.

123
00:06:12.300 --> 00:06:15.600
So here the first thing it asks us for is this

124
00:06:15.600 --> 00:06:18.200
 axis key. So we're gonna go ahead I'm just gonna cut

125
00:06:18.200 --> 00:06:18.800
 and paste.

126
00:06:19.800 --> 00:06:20.400
and do that

127
00:06:21.300 --> 00:06:24.500
The next thing is asking is for is the secret access key and

128
00:06:24.500 --> 00:06:26.000
 I'll cut and paste that as well.

129
00:06:27.700 --> 00:06:30.800
Okay, the next question asks is the default region here

130
00:06:30.800 --> 00:06:33.900
 since we've done everything in US West 2 you

131
00:06:33.900 --> 00:06:36.300
 might as you should keep it as you as let us West 2 unless

132
00:06:36.300 --> 00:06:39.400
 you have a reason and our understand why changing this compares to

133
00:06:39.400 --> 00:06:41.100
 what where the infrastructure is going to be created.

134
00:06:42.200 --> 00:06:43.500
So I'll hit enter for the default.

135
00:06:44.300 --> 00:06:47.400
And then you have this default output format none. It

136
00:06:47.400 --> 00:06:50.400
 could either be Json or text but for our purpose just to

137
00:06:50.400 --> 00:06:51.200
 enter for the default.

138
00:06:51.900 --> 00:06:54.200
Okay, so our axis key has been set

139
00:06:54.200 --> 00:06:57.500
 up locally. The next thing we want to do is we need to create our SSH

140
00:06:57.500 --> 00:07:00.500
 key pair. So once our ec2 instances up

141
00:07:00.500 --> 00:07:02.600
 we can connect to it. So I'm going to clear the screen.

142
00:07:03.700 --> 00:07:06.600
And if you remember I said that I've created I've

143
00:07:06.600 --> 00:07:10.100
 added a file here for you call create SSH keys.sh.

144
00:07:11.200 --> 00:07:14.800
And we're gonna run that so it's gonna prompt us for a passphrase

145
00:07:14.800 --> 00:07:17.500
 and you should always add you should always enter a passphrase

146
00:07:17.500 --> 00:07:20.200
 on your your key pair to keep

147
00:07:20.200 --> 00:07:20.800
 it secure.

148
00:07:21.700 --> 00:07:24.200
So I'll go ahead and go ahead and run the script now.

149
00:07:25.100 --> 00:07:27.900
Asking me for my passphrase. I will enter one.

150
00:07:29.400 --> 00:07:30.100
Confirm it.

151
00:07:31.200 --> 00:07:32.100
Okay, so

152
00:07:33.500 --> 00:07:36.700
you can see here in this line it your identification

153
00:07:36.700 --> 00:07:39.300
 has been saved in lab key pair which is

154
00:07:39.300 --> 00:07:42.300
 just local. That's the private key. And then

155
00:07:42.300 --> 00:07:44.400
 it says your public key has been saved.

156
00:07:45.200 --> 00:07:48.400
And this dot pub file and so those are

157
00:07:48.400 --> 00:07:51.400
 local and then if you remember from the terraform ec2 file

158
00:07:51.400 --> 00:07:54.300
 it was looking in that exact spot just a local

159
00:07:54.300 --> 00:07:57.800
 for for the public key file and we've

160
00:07:57.800 --> 00:08:01.100
 created that. Okay. So with the axis Keys

161
00:08:00.100 --> 00:08:03.700
 done, and now the SSH key done, the

162
00:08:03.700 --> 00:08:06.500
 next thing to do is actually run terraform. So I

163
00:08:06.500 --> 00:08:09.800
 am going to clear the screen once more you can

164
00:08:09.800 --> 00:08:10.900
 see a pattern there with clear on the screen.

165
00:08:12.200 --> 00:08:15.300
And the first thing we need to do is we need to initialize this directory for

166
00:08:15.300 --> 00:08:18.800
 terraform terraform needs to download the libraries. It

167
00:08:18.800 --> 00:08:21.600
 needs to access and communicate with AWS

168
00:08:21.600 --> 00:08:24.200
 and so for that to happen, you need

169
00:08:24.200 --> 00:08:27.800
 to run the terraform in it command. So we're going to go ahead and run terraform

170
00:08:27.800 --> 00:08:28.300
 in it here.

171
00:08:35.200 --> 00:08:38.200
Okay and successful, the biggest thing to take away here is

172
00:08:38.200 --> 00:08:42.700
 that it installed the AWS version 4.5.2 and

173
00:08:41.700 --> 00:08:44.700
 it's signed by hashicorp hashicorp

174
00:08:44.700 --> 00:08:48.100
 is the company that is the Creator and supporter

175
00:08:47.100 --> 00:08:51.000
 of terraform. Okay. So the

176
00:08:50.100 --> 00:08:53.700
 next thing it doesn't even tell you here in the green try running

177
00:08:53.700 --> 00:08:56.400
 plan to see what changes are required for your infrastructure.

178
00:08:56.400 --> 00:08:59.400
 And so that's exactly what to do. So the plan command is

179
00:08:59.400 --> 00:09:03.100
 great because it gives you a dry run of what possibly could

180
00:09:02.100 --> 00:09:05.100
 change if you actually if you

181
00:09:05.100 --> 00:09:08.800
 actually go through with it and so for our case, we expect

182
00:09:08.800 --> 00:09:11.500
 to see a whole bunch of Creations, right? We're creating this

183
00:09:11.500 --> 00:09:14.500
 lab. It's the first time we've ever done this and so

184
00:09:14.500 --> 00:09:15.600
 we'll run plan here.

185
00:09:19.800 --> 00:09:22.200
All right. So there's a lot of output here. Don't be

186
00:09:22.200 --> 00:09:25.600
 taken back by all these lines and known after Plies. What

187
00:09:25.600 --> 00:09:28.000
 I'll do is we'll go over just one of these there's no reason to go

188
00:09:28.200 --> 00:09:31.100
 over all of them. You've kind of seen this code before the biggest thing

189
00:09:31.100 --> 00:09:34.500
 is it's gonna create eight things. So it's gonna go add

190
00:09:34.500 --> 00:09:37.200
 eight things to AWS for us not are gonna

191
00:09:37.200 --> 00:09:40.200
 change and it's not gonna destroy any so let's just scroll

192
00:09:40.200 --> 00:09:43.600
 up a little bit here. And as you can see the green plus signs

193
00:09:43.600 --> 00:09:46.500
 mean creation if it was a destroy you

194
00:09:46.500 --> 00:09:48.000
 would see red negative.

195
00:09:48.800 --> 00:09:51.500
So here you can see the resource what you

196
00:09:51.500 --> 00:09:53.900
 saw in the terraform files during those other videos.

197
00:09:54.800 --> 00:09:57.900
And here this is just creating our lab VPC and

198
00:09:57.900 --> 00:10:00.600
 as if you look at this right column, you can

199
00:10:00.600 --> 00:10:03.200
 see like stuff that's filled in this is the stuff that

200
00:10:03.200 --> 00:10:06.600
 we provided that was in the file. So it knows

201
00:10:06.600 --> 00:10:09.600
 those values before it actually runs them the known

202
00:10:09.600 --> 00:10:12.300
 after apply. For example, like an

203
00:10:12.300 --> 00:10:15.300
 Arn or the ID down here.

204
00:10:16.200 --> 00:10:20.000
Terraform doesn't know these because Amazon AWS will

205
00:10:19.300 --> 00:10:22.800
 create these once the resources created and

206
00:10:22.800 --> 00:10:25.300
 so terraform has to wait for this to happen to then

207
00:10:25.300 --> 00:10:28.700
 retrieve the IDS to store that state locally for

208
00:10:28.700 --> 00:10:28.900
 us.

209
00:10:29.900 --> 00:10:32.500
And as you can see, like all this same values you

210
00:10:32.500 --> 00:10:36.100
 saw in the terraform file are here the tags the enable

211
00:10:35.100 --> 00:10:38.700
 DNS support Etc. So let's come

212
00:10:38.700 --> 00:10:41.500
 down here also to you can see the output here.

213
00:10:41.500 --> 00:10:44.300
 This is the IP address the public IP address

214
00:10:44.300 --> 00:10:47.300
 the ec2 instance when it's created. This is

215
00:10:47.300 --> 00:10:50.600
 that output resour the output directive that

216
00:10:50.600 --> 00:10:53.400
 I put in there that will spit this out. So it's easy for

217
00:10:53.400 --> 00:10:56.600
 us when it's done we can just ssh in and we get

218
00:10:56.600 --> 00:10:59.200
 the IP address right there. Okay. So now it's telling you

219
00:10:59.200 --> 00:11:02.300
 hey, if everything looks good in the plan now, you

220
00:11:02.300 --> 00:11:05.300
 should run apply. So I am going to clear the

221
00:11:05.300 --> 00:11:05.800
 screen once again.

222
00:11:08.400 --> 00:11:09.600
And I'm gonna run apply.

223
00:11:10.200 --> 00:11:13.700
So what we should see here is the exact same output that

224
00:11:13.700 --> 00:11:16.400
 we got with the plan. But this time around

225
00:11:16.400 --> 00:11:18.600
 we get a pause that says

226
00:11:19.500 --> 00:11:22.600
Only enter s yes, if you accept these and

227
00:11:22.600 --> 00:11:25.600
 this is basically making sure that we've double checked

228
00:11:25.600 --> 00:11:28.300
 everything and we're not going to do anything harmful to

229
00:11:28.300 --> 00:11:28.700
 our environment.

230
00:11:29.600 --> 00:11:32.700
We are pretty sure what we're doing here says

231
00:11:32.700 --> 00:11:35.100
 is a new lab and it's all creation. So

232
00:11:35.100 --> 00:11:38.300
 we're gonna hit yes and terraform is gonna go create all this

233
00:11:38.300 --> 00:11:38.400
 stuff.

234
00:11:46.800 --> 00:11:49.100
As you can see as each line is going

235
00:11:49.100 --> 00:11:52.100
 by you can see the resources being created.

236
00:11:59.600 --> 00:12:02.300
And where you see the 10 seconds elapsed still

237
00:12:02.300 --> 00:12:05.400
 creating that is because when you spinning up an ec2

238
00:12:05.400 --> 00:12:08.300
 instance in AWS, it takes some time for it to come up

239
00:12:08.300 --> 00:12:11.500
 and be active and as you can see here, it finished about

240
00:12:11.500 --> 00:12:14.600
 22 seconds out after creating it. So we're

241
00:12:14.600 --> 00:12:17.200
 completed eight resources were created. And as

242
00:12:17.200 --> 00:12:20.400
 you can see here, we have this output down here. This is the public

243
00:12:20.400 --> 00:12:23.200
 IP address of our new Linux instance

244
00:12:23.200 --> 00:12:24.700
 that we just created so

245
00:12:25.600 --> 00:12:28.300
Let's not wait. Let's try to SSH into that.

246
00:12:28.300 --> 00:12:31.100
 And if you recall we have our keep here here.

247
00:12:31.800 --> 00:12:34.300
So what we're gonna do is we're gonna use the SSH command. And

248
00:12:34.300 --> 00:12:36.900
 so we're going to use a flag called Dash. I

249
00:12:37.500 --> 00:12:40.600
But the dash I does it instructs SSH

250
00:12:40.600 --> 00:12:43.800
 today. Hey, when you connect to this host use this key

251
00:12:43.800 --> 00:12:46.300
 and so we are gonna use the

252
00:12:46.300 --> 00:12:49.800
 private key because the public key if you recall is

253
00:12:49.800 --> 00:12:52.200
 up on our ec2 instance and this is gonna

254
00:12:52.200 --> 00:12:55.400
 authenticate us and since we chose Amazon Linux as

255
00:12:55.400 --> 00:12:58.900
 our Linux version, the default user is ec2

256
00:12:58.900 --> 00:12:59.100
 user.

257
00:13:00.400 --> 00:13:03.100
And we will type that now and then I'm gonna

258
00:13:03.100 --> 00:13:06.300
 paste the IP address here. And so this is what your

259
00:13:06.300 --> 00:13:09.900
 SSH command's gonna look like to get into our newly

260
00:13:09.900 --> 00:13:11.900
 created Linux host. So hit enter.

261
00:13:13.200 --> 00:13:16.100
Here's this asking us. This is the new host. We've never seen it before.

262
00:13:16.100 --> 00:13:19.800
 Are you sure you want to continue connecting? Yes, it's okay. So

263
00:13:19.800 --> 00:13:20.600
 type in yes.

264
00:13:22.200 --> 00:13:25.200
And so it's asking me for my passphrase that I set on my key pair.

265
00:13:26.400 --> 00:13:27.500
I'll type my passphrase.

266
00:13:29.100 --> 00:13:32.800
And there we go. We are now inside our

267
00:13:32.800 --> 00:13:35.500
 brand new created ec2 Linux

268
00:13:35.500 --> 00:13:36.500
 instance.

269
00:13:37.500 --> 00:13:40.900
Now I'm not gonna poke around that much in here. And the

270
00:13:40.900 --> 00:13:43.200
 reason being is that we're gonna

271
00:13:43.200 --> 00:13:46.400
 do a lot more of that in the next section, but I wanted

272
00:13:46.400 --> 00:13:49.400
 to have validate that this was up and running. We also I

273
00:13:49.400 --> 00:13:52.500
 want to take you back over to the browser so you can see what

274
00:13:52.500 --> 00:13:55.800
 it looks like now inside the browser in not

275
00:13:55.800 --> 00:13:58.000
 just in the SSH terminal. So let's do that really quick right now.

276
00:13:59.200 --> 00:14:02.700
Okay. So back in the browser in AWS console.

277
00:14:02.700 --> 00:14:05.100
 I want to go ahead and just click on ec2. We're just

278
00:14:05.100 --> 00:14:06.600
 gonna go look at the ec2 overview.

279
00:14:09.100 --> 00:14:12.800
Here now, you can see that instances running says one. So

280
00:14:12.800 --> 00:14:14.500
 let's go ahead and click on instances running.

281
00:14:15.200 --> 00:14:18.300
And it brings us to we have one instance running. We're in

282
00:14:18.300 --> 00:14:20.200
 the US West 2 region, which is important.

283
00:14:21.400 --> 00:14:24.400
If let's go ahead and click the checkbox here for our lab one,

284
00:14:24.400 --> 00:14:28.300
 which is if you recall what we named it and here's the details page really

285
00:14:27.300 --> 00:14:30.200
 quick. What's probably worth mentioning is

286
00:14:30.200 --> 00:14:33.700
 you already know the IP address because that well we SSH into you

287
00:14:33.700 --> 00:14:36.700
 can see the instance type which we set which is the TCP

288
00:14:36.700 --> 00:14:39.800
 micro here. You can see that this is this instance

289
00:14:39.800 --> 00:14:42.400
 is running inside the new VPC we created called

290
00:14:42.400 --> 00:14:43.300
 lab VPC.

291
00:14:44.200 --> 00:14:47.500
And you can see it's in the subnet lab subnet public one. So everything

292
00:14:47.500 --> 00:14:48.000
 that we

293
00:14:48.900 --> 00:14:51.300
Set up in those terraform files all the

294
00:14:51.300 --> 00:14:54.700
 end state that we defined is all here

295
00:14:54.700 --> 00:14:55.000
 now.

296
00:14:55.600 --> 00:14:58.200
And not much else to go you obviously there's your key

297
00:14:58.200 --> 00:14:58.900
 pair that we used.

298
00:15:00.300 --> 00:15:03.400
We'll dive into this Linux more as we

299
00:15:03.400 --> 00:15:06.000
 go through later in this course, but I just wanted to show

300
00:15:06.100 --> 00:15:07.700
 you both ways. We SSH into it.

301
00:15:08.500 --> 00:15:11.700
And we checked the AWS console. So let's

302
00:15:11.700 --> 00:15:14.300
 jump back over and let's let's do a recap and

303
00:15:14.300 --> 00:15:15.300
 everything that we did in this video.

304
00:15:16.600 --> 00:15:19.200
We did a lot in this video. So let's go over a few

305
00:15:19.200 --> 00:15:22.500
 key aspects that I think are worth talking about. So one

306
00:15:22.500 --> 00:15:25.400
 of the first things you did is you created an SSH key pair

307
00:15:25.400 --> 00:15:28.800
 that you used to connect to your ec2 instance. You also

308
00:15:28.800 --> 00:15:32.300
 created access keys that AWS CLI

309
00:15:31.300 --> 00:15:33.900
 and terraform used

310
00:15:34.700 --> 00:15:37.600
to create all our infrastructure. You got

311
00:15:37.600 --> 00:15:40.700
 to run the in it plan and apply commands for

312
00:15:40.700 --> 00:15:42.900
 terraform that created your infrastructure.

313
00:15:44.100 --> 00:15:47.600
Finally you verified that your lab one ec2

314
00:15:47.600 --> 00:15:50.200
 instance was created and usshed into

315
00:15:50.200 --> 00:15:50.300
 it.

316
00:15:51.600 --> 00:15:54.400
Alright, congratulations, you have completed

317
00:15:54.400 --> 00:15:56.300
 creating the lab portion of this course.

318
00:15:57.100 --> 00:16:00.200
I know the section was on the long side, but I wanted to make sure you

319
00:16:00.200 --> 00:16:03.500
 had a good look at both the infrastructure's code and how they map to

320
00:16:03.500 --> 00:16:06.600
 the AWS console. I find this is very important for you

321
00:16:06.600 --> 00:16:07.300
 going forward.

322
00:16:08.100 --> 00:16:11.400
You now have the necessary tools to continue in the next section.

323
00:16:12.400 --> 00:16:15.400
Speaking of the next section you'll be learning Linux Administration

324
00:16:15.400 --> 00:16:18.200
 operations in the cloud by leveraging your newly created

325
00:16:18.200 --> 00:16:19.800
 lab environment. We'll see you there.
