File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Download
6
6
7
+ Terraform v0.12 is installed in this disk image. If you need to download Terraform, it's available at this link:
8
+
7
9
[ Download Terraform] ( https://www.terraform.io/downloads.html )
8
10
11
+ To download, use a command line tool like ` wget ` on Linux or Mac:
12
+
9
13
```
10
14
wget https://releases.hashicorp.com/terraform/0.12.2/terraform_0.12.2_linux_amd64.zip
11
15
```
12
16
13
17
### Unzip
14
18
19
+ Unzip the Terraform executable:
20
+
15
21
```
16
22
unzip terraform_*
17
23
```
18
24
19
25
### Verify version
20
26
27
+ Verify that you are running Terraform 0.12 or greater.
28
+
21
29
```
22
- ./ terraform version
30
+ terraform version
23
31
```
24
32
33
+ You should see ` v0.12.2 ` or greater in the output.
34
+
25
35
```
26
36
Terraform v0.12.2
27
37
```
28
38
39
+ If you are using a locally downloaded version if Terraform in the current directory, use ` ./terraform ` (leading dot slash) to run the command.
40
+
29
41
NOTE: On any error, verify that you're using Terraform ` 0.12 ` or greater with ` ./terraform version `
30
42
31
43
### Optional: Skip to final code in ` after ` branch
@@ -79,19 +91,19 @@ resource "google_compute_network" "vpc_network" {
79
91
### Init
80
92
81
93
```
82
- ./ terraform init
94
+ terraform init
83
95
```
84
96
85
97
### Plan
86
98
87
99
```
88
- ./ terraform plan
100
+ terraform plan
89
101
```
90
102
91
103
### Apply
92
104
93
105
```
94
- ./ terraform apply
106
+ terraform apply
95
107
```
96
108
97
109
You should see:
@@ -129,7 +141,7 @@ resource "google_compute_firewall" "default" {
129
141
```
130
142
131
143
```
132
- ./ terraform apply
144
+ terraform apply
133
145
```
134
146
135
147
### Define a compute instance
@@ -162,7 +174,7 @@ resource "google_compute_instance" "vm_instance" {
162
174
### Show state
163
175
164
176
```
165
- ./ terraform show
177
+ terraform show
166
178
```
167
179
168
180
Scroll up to ` network_interface ` and ` access_config ` and ` nat_ip ` . You'll find an IP address something like ` 0.0.0.0 ` .
@@ -205,7 +217,7 @@ git checkout -t origin/after
205
217
## Destroy
206
218
207
219
```
208
- ./ terraform destroy
220
+ terraform destroy
209
221
```
210
222
211
223
```
You can’t perform that action at this time.
0 commit comments