Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.29 KB

gcp.md

File metadata and controls

44 lines (32 loc) · 1.29 KB

GCP Infrastructure

Authentication for Google provider

Download the .json authentication file and set the following terraform variable:

variable "credentials" {
  description = "Service account credentials in json format"
  default     = "./keys/gcp_creds.json"
}
gcp_creds.json
{
  "type": "service_account",
  "project_id": "",
  "private_key_id": "",
  "private_key": "",
  "client_email": "",
  "client_id": "",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": ""
}

For Terraform Cloud you have to configure the .json as GOOGLE_CREDENTIALS environment variable (all in one line).

References

Terraform google provider

Google Cloud Platform Provider

google_compute_instance

google_compute_network

google_compute_firewall

google_compute_address