File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,14 @@ module "gke" {
5454 },
5555 ]
5656
57+ node_pools_oauth_scopes = {
58+ all = []
59+
60+ default-node-pool = [
61+ "https://www.googleapis.com/auth/cloud-platform",
62+ ]
63+ }
64+
5765 node_pools_labels = {
5866 all = {}
5967
Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ resource "google_container_node_pool" "pools" {
140140 preemptible = " ${ lookup (var. node_pools [count . index ], " preemptible" , false )} "
141141
142142 oauth_scopes = [
143- " https://www.googleapis.com/auth/cloud-platform" ,
143+ " ${ concat (var. node_pools_oauth_scopes [" all" ],
144+ var. node_pools_oauth_scopes [lookup (var. node_pools [count . index ], " name" )])} " ,
144145 ]
145146 }
146147
Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ resource "google_container_node_pool" "zonal_pools" {
140140 preemptible = " ${ lookup (var. node_pools [count . index ], " preemptible" , false )} "
141141
142142 oauth_scopes = [
143- " https://www.googleapis.com/auth/cloud-platform" ,
143+ " ${ concat (var. node_pools_oauth_scopes [" all" ],
144+ var. node_pools_oauth_scopes [lookup (var. node_pools [count . index ], " name" )])} " ,
144145 ]
145146 }
146147
Original file line number Diff line number Diff line change @@ -180,6 +180,16 @@ variable "node_pools_tags" {
180180 }
181181}
182182
183+ variable "node_pools_oauth_scopes" {
184+ type = " map"
185+ description = " Map of lists containing node oauth scopes by node-pool name"
186+
187+ default = {
188+ all = [" https://www.googleapis.com/auth/cloud-platform" ]
189+ default-node-pool = []
190+ }
191+ }
192+
183193variable "stub_domains" {
184194 type = " map"
185195 description = " Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server"
You can’t perform that action at this time.
0 commit comments