Skip to content

Commit aa0f33c

Browse files
author
Andrew Suderman
authored
Add taints to node pool module (#36)
1 parent dcda296 commit aa0f33c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

node_pool/inputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,8 @@ variable "enable_secure_boot" {
8686
description = "If shielded nodes is enabled at the cluster level, you can optionally set this to enable secure boot on shielded nodes."
8787
default = false
8888
}
89+
90+
variable "taint" {
91+
description = "Key value pairs of taints to apply on nodes in the pool"
92+
type = map
93+
}

node_pool/main.tf

+14
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ resource "google_container_node_pool" "node_pool" {
7474
}
7575
}
7676

77+
dynamic "taint" {
78+
for_each = [var.taint]
79+
content {
80+
# TF-UPGRADE-TODO: The automatic upgrade tool can't predict
81+
# which keys might be set in maps assigned here, so it has
82+
# produced a comprehensive set here. Consider simplifying
83+
# this after confirming which keys can be set in practice.
84+
85+
effect = taint.value.effect
86+
key = taint.value.key
87+
value = taint.value.value
88+
}
89+
}
90+
7791
oauth_scopes = concat(local.base_oauth_scope, var.additional_oauth_scopes)
7892
}
7993

0 commit comments

Comments
 (0)