Rename Azure cluster region variable to location

* Rename the region variable to location to align with Azure
platform conventions, where resources are created within an
Azure location, which are themselves part of broader geographical
regions
This commit is contained in:
Dalton Hubble
2024-07-08 21:20:46 -07:00
parent 48d4973957
commit 24b7f31c55
21 changed files with 42 additions and 40 deletions

View File

@ -5,9 +5,9 @@ variable "name" {
# Azure
variable "region" {
variable "location" {
type = string
description = "Must be set to the Azure Region of cluster"
description = "Must be set to the Azure location of cluster"
}
variable "resource_group_name" {

View File

@ -11,7 +11,7 @@ locals {
resource "azurerm_linux_virtual_machine_scale_set" "workers" {
name = "${var.name}-worker"
resource_group_name = var.resource_group_name
location = var.region
location = var.location
sku = var.vm_type
instances = var.worker_count
# instance name prefix for instances in the set
@ -91,7 +91,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
resource "azurerm_monitor_autoscale_setting" "workers" {
name = "${var.name}-maintain-desired"
resource_group_name = var.resource_group_name
location = var.region
location = var.location
# autoscale
enabled = true
target_resource_id = azurerm_linux_virtual_machine_scale_set.workers.id