Skip to content

Commit

Permalink
fix: move instance type into local
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpanzella committed Sep 26, 2024
1 parent e2417ee commit 8e0bf3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ module "app_lb" {
tags = var.tags
}

locals {
kubernetes_instance_type = try(local.deployment_size[var.size].node_type, var.kubernetes_instance_type)
}

data "external" "az_zones" {
program = ["bash", "${path.module}/vmtype_to_az.sh", local.kubernetes_instance_type, azurerm_resource_group.default.location, var.node_pool_num_zones]
}
Expand All @@ -126,7 +130,7 @@ module "app_aks" {
location = azurerm_resource_group.default.location
namespace = var.namespace
node_pool_vm_count = try(local.deployment_size[var.size].node_count, var.kubernetes_node_count)
node_pool_vm_size = try(local.deployment_size[var.size].node_instance, var.kubernetes_instance_type)
node_pool_vm_size = local.kubernetes_instance_type
node_pool_zones = var.node_pool_zones
public_subnet = module.networking.public_subnet
resource_group = azurerm_resource_group.default
Expand Down

0 comments on commit 8e0bf3a

Please sign in to comment.