Skip to content

Commit

Permalink
Merge pull request #326 from kbst/deprecated-attributes
Browse files Browse the repository at this point in the history
Fix deprecated attributes in new provider versions
  • Loading branch information
pst committed Jan 4, 2024
2 parents c0c8d85 + 38d20df commit 910ed10
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
path: ./quickstart/_dist

- name: Install Cosign
uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 #v3.0.2
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 #v3.3.0

- name: 'Setup buildx'
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
path: ./quickstart/_dist

- name: Install Cosign
uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 #v3.0.2
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 #v3.3.0

- name: 'Docker login'
uses: docker/login-action@v2
Expand Down Expand Up @@ -256,8 +256,8 @@ jobs:
path: ./quickstart/_dist

- name: Install Cosign
uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 #v3.0.2
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 #v3.3.0

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down
2 changes: 1 addition & 1 deletion aws/_modules/eks/node_pool/launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
is_gpu = length(data.aws_ec2_instance_type.current.gpus) > 0
ami_name = local.is_gpu ? "amazon-linux-2-gpu" : local.cpu_ami_name
ami_release_prefix = local.is_gpu ? "amazon-eks-gpu-node" : "amazon-eks-node"
ami_release_date = split("-", var.ami_release_version)[1]
ami_release_date = var.ami_release_version == null ? "" : split("-", var.ami_release_version)[1]
ami_release_name = var.ami_release_version == null ? "recommended" : "${local.ami_release_prefix}-${var.kubernetes_version}-v${local.ami_release_date}"
}

Expand Down
2 changes: 1 addition & 1 deletion aws/_modules/eks/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "aws_eip" "nat_gw" {

tags = local.eks_metadata_tags

vpc = true
domain = "vpc"
}

resource "aws_nat_gateway" "current" {
Expand Down
2 changes: 1 addition & 1 deletion azurerm/_modules/aks/service_principal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "azuread_application" "current" {
resource "azuread_service_principal" "current" {
count = var.disable_managed_identities == true ? 1 : 0

application_id = azuread_application.current[0].application_id
client_id = azuread_application.current[0].client_id
}

resource "azuread_service_principal_password" "current" {
Expand Down
10 changes: 9 additions & 1 deletion google/_modules/gke/node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ resource "google_container_node_pool" "current" {
}
}

taint = var.taint
dynamic "taint" {
for_each = var.taints == null ? [] : var.taints

content {
key = taint.key
value = taint.value
effect = taint.effect
}
}
}

management {
Expand Down
10 changes: 7 additions & 3 deletions google/_modules/gke/node_pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ variable "node_workload_metadata_config" {
type = string
}

variable "taint" {
variable "taints" {
type = set(object({
key = string
value = string
effect = string
}))
description = "Taints to configure for the node pool."
type = list(any)
default = []
default = null
}

variable "node_locations" {
Expand Down
2 changes: 1 addition & 1 deletion google/cluster/node-pool/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ locals {
auto_repair = local.cfg["auto_repair"] != null ? local.cfg["auto_repair"] : true
auto_upgrade = local.cfg["auto_upgrade"] != null ? local.cfg["auto_upgrade"] : true

taint = local.cfg["taint"]
taints = local.cfg["taints"]

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

Expand Down
2 changes: 1 addition & 1 deletion google/cluster/node-pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "node_pool" {

node_workload_metadata_config = local.node_workload_metadata_config

taint = local.taint
taints = local.taints

service_account_email = local.service_account_email
disable_per_node_pool_service_account = local.service_account_email == null ? false : true
Expand Down
2 changes: 1 addition & 1 deletion google/cluster/node-pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variable "configuration" {
auto_repair = optional(bool)
auto_upgrade = optional(bool)

taint = optional(set(object({
taints = optional(set(object({
key = string
value = string
effect = string
Expand Down

0 comments on commit 910ed10

Please sign in to comment.