File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
modules/instance_template Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 18
18
# Locals
19
19
# ########
20
20
21
+ data "google_service_account" "existing_sa" {
22
+ provider = google- beta
23
+ count = local. create_service_account == false ? 1 : 0
24
+ account_id = google_compute_instance_template. tpl . service_account [0 ]. email
25
+ }
26
+
21
27
locals {
22
28
source_image = var. source_image != " " ? var. source_image : " rocky-linux-9-optimized-gcp-v20240111"
23
29
source_image_family = var. source_image_family != " " ? var. source_image_family : " rocky-linux-9-optimized-gcp"
@@ -80,7 +86,11 @@ locals {
80
86
id = google_service_account.sa[0 ].account_id,
81
87
email = google_service_account.sa[0 ].email,
82
88
member = google_service_account.sa[0 ].member
83
- } : {}
89
+ } : {
90
+ id = data.google_service_account.existing_sa[0 ].account_id,
91
+ email = data.google_service_account.existing_sa[0 ].email,
92
+ member = data.google_service_account.existing_sa[0 ].member
93
+ }
84
94
}
85
95
86
96
# Service account
Original file line number Diff line number Diff line change @@ -365,6 +365,11 @@ spec:
365
365
version : ^10.0
366
366
spec :
367
367
outputExpr : " [\" roles/bigquery.dataEditor\" ]"
368
+ - source :
369
+ source : github.com/GoogleCloudPlatform/terraform-google-bigtable
370
+ version : " >= 0.1.0"
371
+ spec :
372
+ outputExpr : " [\" roles/bigtable.admin\" ]"
368
373
- name : enable_shielded_vm
369
374
description : Whether to enable the Shielded VM configuration on the instance. Note that the instance image must support Shielded VMs. See https://cloud.google.com/compute/docs/images
370
375
varType : bool
You can’t perform that action at this time.
0 commit comments