github.com/arvindram03/terraform@v0.3.7-0.20150212015210-408f838db36d/website/source/docs/providers/google/index.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Provider: Google Cloud" 4 sidebar_current: "docs-google-index" 5 description: |- 6 The Google Cloud provider is used to interact with Google Cloud services. The provider needs to be configured with the proper credentials before it can be used. 7 --- 8 9 # Google Cloud Provider 10 11 The Google Cloud provider is used to interact with 12 [Google Cloud services](https://cloud.google.com/). The provider needs 13 to be configured with the proper credentials before it can be used. 14 15 Use the navigation to the left to read about the available resources. 16 17 ## Example Usage 18 19 ``` 20 # Configure the Google Cloud provider 21 provider "google" { 22 account_file = "account.json" 23 project = "my-gce-project" 24 region = "us-central1" 25 } 26 27 # Create a new instance 28 resource "google_compute_instance" "default" { 29 ... 30 } 31 ``` 32 33 ## Configuration Reference 34 35 The following keys can be used to configure the provider. 36 37 * `account_file` - (Required) Path to the JSON file used to describe 38 your account credentials, downloaded from Google Cloud Console. More 39 details on retrieving this file are below. 40 41 * `project` - (Required) The name of the project to apply any resources to. 42 43 * `region` - (Required) The region to operate under. 44 45 ## Authentication JSON File 46 47 Authenticating with Google Cloud services requires a JSON 48 file which we call the _account file_. 49 50 This file is downloaded directly from the 51 [Google Developers Console](https://console.developers.google.com). To make 52 the process more straightforwarded, it is documented here: 53 54 1. Log into the [Google Developers Console](https://console.developers.google.com) 55 and select a project. 56 57 2. Under the "APIs & Auth" section, click "Credentials." 58 59 3. Create a new OAuth client ID and select "Service account" as the type 60 of account. Once created, and after a P12 key is downloaded, a JSON file should be downloaded. This is your _account file_.