
VSCode Setup for AWS and Terraform
VSCode Setup for AWS and Terraform
We’re going to quickly setup VSCode to use Terraform with AWS
Content
0.719 -> hello and welcome back
2.56 -> in this lesson we're going to get visual
4.72 -> studio code all set up so that we can
7.2 -> start deploying our terraform resources
10.32 -> so let's get started as you can see i've
13.04 -> already installed visual studio code it
15.04 -> was a pretty straightforward process i
17.199 -> am on a windows machine
19.039 -> but this of course will also work on a
21.039 -> mac or linux so go ahead and first
24 -> things first let's get the aws extension
26.72 -> installed
27.76 -> so click on the extensions icon here on
30.24 -> the left
32.079 -> and then search for aws
34.96 -> and once you've done that we've got this
36.719 -> aws toolkit here go ahead and click
39.76 -> install
42.32 -> looks like everything installed fine so
44.239 -> i'm going to go ahead and close this
45.84 -> pane
47.2 -> and close this tab
49.039 -> and then i'm going to click on this
50.399 -> little aws icon
53.76 -> as you can see we've got connect to aws
55.92 -> right here but before we can do that we
58.239 -> need to get some credentials installed
60.16 -> so head up to view and command palette
63.6 -> then as you can see i've searched for
65.28 -> this before but if you need to get to it
67.28 -> you can type aws and then start typing
70 -> create credentials profile just like so
72.96 -> and then open that and as you can see
75.2 -> here i've got a credentials profile
77.28 -> called vs code if yours looks different
79.759 -> make sure that you get this looking the
81.52 -> same if you want to follow along in the
83.28 -> course exactly but of course if you
85.36 -> don't or you're comfortable making
87.2 -> simple modifications you can name this
88.96 -> whatever you'd like but what we need to
90.799 -> do is populate this aws access key id in
94.24 -> secret access key so go ahead and open
97.36 -> your credentials file and paste this
100.159 -> information in
101.92 -> just like so
103.68 -> alright and once you've done that go
105.439 -> ahead and control s to save this file
108.24 -> you should not have this white dot that
109.92 -> was up here before and close this tab
112.96 -> and then click on connect to aws
116.399 -> and you should see your profile right
118.56 -> here if not you can obviously type
120.799 -> profile
122.24 -> vs code
124.079 -> if you need to and just click on that
126.32 -> and default region of us east one
129.44 -> i actually don't want that region i'm
131.76 -> going to use a different one but
133.04 -> whichever region you choose you can
135.12 -> choose that here
136.48 -> i'm just going to say no
139.2 -> and i'm going to add
141.04 -> us west
143.76 -> to
144.8 -> that's the region i typically use in my
146.56 -> courses because there's so much default
148.48 -> stuff that goes on in us east one i just
150.959 -> prefer to stick with us west too but
153.04 -> this is totally up to you so once you've
155.44 -> done that you can go ahead and minimize
157.76 -> that and then open the extensions panel
160.239 -> again
161.519 -> let's go ahead and add something that
163.36 -> will give us a little terraform syntax
165.44 -> highlighting let's go ahead and type in
167.519 -> terraform and as you can see there is an
170 -> official terraform extension here it's
173.12 -> rated 2.5 it is pretty buggy it might be
176.959 -> better now that you're watching this
178.319 -> video feel free to choose this one if
180.239 -> you'd like but i'm actually going to use
182.959 -> this one here it's just got a higher
184.959 -> rating and it's been pretty consistent
187.28 -> for me so i'm going to install this one
190 -> just like so
191.36 -> alright and i'm going to close that tab
193.28 -> and close my extensions so now that
195.44 -> we've got our extensions installed let's
197.68 -> go ahead and create
199.68 -> our working directory so i'm going to go
202 -> ahead and click on open folder and i'm
204.56 -> just going to set mine up in the
207.12 -> documents directory feel free to set
209.12 -> this up wherever you'd like of course
211.12 -> just like so and then i'm going to
212.959 -> create a new directory
217.36 -> and i'm just going to call it terraform
219.76 -> just like so
221.44 -> alright and i'm going to open that
224.4 -> and hit select folder just like so
228.319 -> alright so now we have a working
229.92 -> directory we've got our extensions
232.08 -> installed everything is ready to start
234.879 -> the course so go ahead and mark this
237.28 -> lesson complete come on back to the next
239.439 -> one and let's get started
Source: https://www.youtube.com/watch?v=ThlynejTCWE