-
Notifications
You must be signed in to change notification settings - Fork 1
/
provider.tf
57 lines (51 loc) · 1.43 KB
/
provider.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Terraform provider definitions
*/
terraform {
required_version = ">= 0.13"
required_providers {
equinix = {
source = "equinix/equinix"
version = "1.5.0"
}
google = {
source = "hashicorp/google"
version = "~> 4.17.0"
}
time = "~> 0.6.0"
}
}
provider "equinix" {
client_id = var.eqx_fabric_client_id
client_secret = var.eqx_fabric_client_secret
request_timeout = 60
}
/*
provider "google" {
alias = "impersonation_tokengen"
}
# get config of the client that runs
data "google_client_config" "default" {
provider = google.impersonation_tokengen
}
data "google_service_account_access_token" "sa" {
provider = google.impersonation_tokengen
target_service_account = "terraform-runner@${var.gcp_project_id}.iam.gserviceaccount.com"
lifetime = "1800s"
scopes = ["userinfo.email","cloud-platform","iam"]
}
*/
/******************************************
GA Provider configuration
*****************************************/
provider "google" {
#access_token = data.google_service_account_access_token.sa.access_token
credentials = file("/home/marius/Downloads/equinix-gcp-demo-3046aa310856.json")
project = var.gcp_project_id
region = var.gcp_region
scopes = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/iam",
]
}