-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathproviders.tf.disabled
47 lines (38 loc) · 1.41 KB
/
providers.tf.disabled
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
# Locals block to hold and modify the values
locals {
tf_sa = var.terraform_service_account
}
provider "google" {
alias = "tokengen"
}
data "google_service_account_access_token" "default" {
provider = google.tokengen
target_service_account = local.tf_sa
// To see, edit, configure, and delete your Google Cloud data
scopes = ["https://www.googleapis.com/auth/cloud-platform"]
lifetime = "600s"
}
/******************************************
GA Provider credential configuration
*****************************************/
provider "google" {
// configure the default project and region.
project = var.project_id
region = var.default_region
zone = var.default_zone
// A temporary OAuth 2.0 access token obtained from the Google Authorization server
// used to authenticate HTTP requests to GCP APIs.
access_token = data.google_service_account_access_token.default.access_token
}
/******************************************
Beta Provider credential configuration
*****************************************/
provider "google-beta" {
// configure the default project and region.
project = var.project_id
region = var.default_region
zone = var.default_zone
// A temporary OAuth 2.0 access token obtained from the Google Authorization server
// used to authenticate HTTP requests to GCP APIs.
access_token = data.google_service_account_access_token.default.access_token
}