Skip to Content
Implementing Modern DevOps
book

Implementing Modern DevOps

by David Gonzalez, Danny Varghese
October 2017
Intermediate to advanced
326 pages
7h 20m
English
Packt Publishing
Content preview from Implementing Modern DevOps

Creating resources

Now that we have all the requirements installed, we are going to create our first resource in order to help us to understand how Terraform works and how powerful it is. Create a folder called implementing-modern-devops somewhere in your computer and add a file called resources.tf with the following content:

provider "google" { credentials = "${file("xxx.json")}" project = "implementing-modern-devops" region = "europe-west1-b"}resource "google_compute_instance" "my-first-instance" {}

As you can see, the preceding snipped is very similar to JSON but it is actually called HCL: HashiCorp Configuration Language. Let's explain what the code is doing.

The first section is where we configure our credentials. As you can see, Terraform ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical DevOps

Practical DevOps

joakim verona
Hands-On Security in DevOps

Hands-On Security in DevOps

Tony Hsiang-Chih Hsu
SRE with Java Microservices

SRE with Java Microservices

Jonathan Schneider

Publisher Resources

ISBN: 9781786466877Supplemental Content