Skip to content

Commit e6d9279

Browse files
committed
Fix deprecated attributes in new provider versions
* aws_vpc replace vpc with domain attribute * azuread_service_principal rename application_id to client_id * gke node_config refactor taints to be in block format
1 parent c0c8d85 commit e6d9279

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

aws/_modules/eks/vpc.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ resource "aws_eip" "nat_gw" {
4040

4141
tags = local.eks_metadata_tags
4242

43-
vpc = true
43+
domain = "vpc"
4444
}
4545

4646
resource "aws_nat_gateway" "current" {

azurerm/_modules/aks/service_principal.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "azuread_application" "current" {
77
resource "azuread_service_principal" "current" {
88
count = var.disable_managed_identities == true ? 1 : 0
99

10-
application_id = azuread_application.current[0].application_id
10+
client_id = azuread_application.current[0].client_id
1111
}
1212

1313
resource "azuread_service_principal_password" "current" {

google/_modules/gke/node_pool/main.tf

+9-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,15 @@ resource "google_container_node_pool" "current" {
4949
}
5050
}
5151

52-
taint = var.taint
52+
dynamic "taint" {
53+
for_each = var.taints == null ? [] : var.taints
54+
55+
content {
56+
key = taint.key
57+
value = taint.value
58+
effect = taint.effect
59+
}
60+
}
5361
}
5462

5563
management {

google/_modules/gke/node_pool/variables.tf

+7-3
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,14 @@ variable "node_workload_metadata_config" {
109109
type = string
110110
}
111111

112-
variable "taint" {
112+
variable "taints" {
113+
type = set(object({
114+
key = string
115+
value = string
116+
effect = string
117+
}))
113118
description = "Taints to configure for the node pool."
114-
type = list(any)
115-
default = []
119+
default = null
116120
}
117121

118122
variable "node_locations" {

google/cluster/node-pool/configuration.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ locals {
3030
auto_repair = local.cfg["auto_repair"] != null ? local.cfg["auto_repair"] : true
3131
auto_upgrade = local.cfg["auto_upgrade"] != null ? local.cfg["auto_upgrade"] : true
3232

33-
taint = local.cfg["taint"]
33+
taints = local.cfg["taints"]
3434

3535
extra_oauth_scopes = local.cfg["extra_oauth_scopes"] != null ? local.cfg["extra_oauth_scopes"] : []
3636

google/cluster/node-pool/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module "node_pool" {
3030

3131
node_workload_metadata_config = local.node_workload_metadata_config
3232

33-
taint = local.taint
33+
taints = local.taints
3434

3535
service_account_email = local.service_account_email
3636
disable_per_node_pool_service_account = local.service_account_email == null ? false : true

google/cluster/node-pool/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ variable "configuration" {
2121
auto_repair = optional(bool)
2222
auto_upgrade = optional(bool)
2323

24-
taint = optional(set(object({
24+
taints = optional(set(object({
2525
key = string
2626
value = string
2727
effect = string

0 commit comments

Comments
 (0)