You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/infrastructure-as-code-on-hpe-greenlake-using-terraform-–-part-2.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,6 @@ tags:
21
21
22
22
- - -
23
23
24
-
25
24
The process of managing and provisioning computer data centers through machine-readable definition files, otherwise known as Infrastructure-as-Code (IaC), offers many significant benefits. It helps to increase operational agility, simplify management, reduce errors, and save cost. In this second post, I’ll explore how to extract more of the benefits of using IaC on HPE GreenLake through the use of Terraform.
26
25
27
26
## Let’s recap
@@ -38,7 +37,7 @@ terraform {
38
37
required_providers {
39
38
hpegl = {
40
39
source = "hpe/hpegl"
41
-
version = "0.1.7"
40
+
version = "0.3.17"
42
41
}
43
42
}
44
43
}
@@ -257,7 +256,7 @@ Once your infrastructure is created, it will need to evolve over time in order t
257
256
258
257
### Use case 1: Stop this VM
259
258
260
-
To start, let’s keep things simple. You might want to just turn off the VMs that are part of an infrastructure when you don’t need them to save cost or limit your carbon impact on the planet. If you paid attention to the current configuration file, you’ll see that we inserted a power statement when originally creating the VM. While *poweron* is the only valid option when creating a new resource of type **hpegl\_vmaas\_instance**, other values are available for lifecycle management, such as *poweroff* and *suspend*.
259
+
To start, let’s keep things simple. You might want to just turn off the VMs that are part of an infrastructure when you don’t need them to save cost or limit your carbon impact on the planet. If you paid attention to the current configuration file, you’ll see that we inserted a power statement when originally creating the VM. While *poweron* is the only valid option when creating a new resource of type **hpegl_vmaas_instance**, other values are available for lifecycle management, such as *poweroff* and *suspend*.
261
260
262
261
Locate the following section in your configuration file:
263
262
@@ -356,7 +355,7 @@ Save the file, apply those changes, wait a little and check the details of the V
356
355
## Debugging when things go wrong
357
356
358
357
In this post, I’ve showed you how to make sure the Terraform configuration file is valid before applying changes using the **terraform validate** command. To see more details during an apply command, you can also enable Terraform debug by simply setting up the TF_LOG environment variable. I suggest setting it up to DEBUG but other supported values are: TRACE, INFO, WARN and ERROR.
359
-
358
+
360
359
```markdown
361
360
export TF_LOG=DEBUG
362
361
```
@@ -371,4 +370,4 @@ In [my first blog post](https://developer.hpe.com/blog/infrastructure-as-code-on
371
370
372
371
\-[ Learn more about the HPE GreenLake Terraform provider](https://registry.terraform.io/providers/HPE/hpegl)
373
372
374
-
Don’t forget, you can always find other tutorials and articles on HPE GreenLake on the [HPE Developer blog](https://developer.hpe.com/blog).
373
+
Don’t forget, you can always find other tutorials and articles on HPE GreenLake on the [HPE Developer blog](https://developer.hpe.com/blog).
0 commit comments