Implementing Modern DevOps: Enabling IT organizations to deliver faster and smarter by David Gonzalez

Implementing Modern DevOps: Enabling IT organizations to deliver faster and smarter by David Gonzalez

Author:David Gonzalez [Gonzalez, David]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-10-04T04:00:00+00:00


The IP was associated with our VM, as expected.

Terraform variables

One thing we did not mention earlier is the fact that Terraform can work with variables. Take a look at the following definition:

provider "google" {

credentials = "${file("xxx.json")}"

project = "implementing-modern-devops"

region = "europe-west1"

}

This is the configuration of our provider. There are few strings that, quite likely, are going to be used in other places, such as the region or the name of the project. Terraform has the concept of variable, which is a value that is susceptible to change so we can extract it into a separated file. Up until now, we have created a file called resources.tf. Let's create a file called vars.tf with the following content:

variable "project_name" {

type = "string"

default = "implementing-modern-devops"

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.