From 36c1f357c0d2ee9b029958b25820b8d3e4719949 Mon Sep 17 00:00:00 2001 From: Fraser Davidson Date: Fri, 31 May 2024 11:43:52 +0100 Subject: [PATCH] WIP --- modules/cdn-profile/src/locals.tf | 8 ++------ modules/cdn-profile/src/main.tf | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/cdn-profile/src/locals.tf b/modules/cdn-profile/src/locals.tf index 6a78776..edd1bb4 100644 --- a/modules/cdn-profile/src/locals.tf +++ b/modules/cdn-profile/src/locals.tf @@ -1,14 +1,10 @@ locals { identifier = replace(lower(var.identifier), "/[^a-z1-9]/", "") - - short_locations = { - "uksouth" = "uks" - "ukwest" = "ukw" - } + location = "global" tags = { Environment = var.environment - Location = var.location + Location = local.location Zone = var.zone } } diff --git a/modules/cdn-profile/src/main.tf b/modules/cdn-profile/src/main.tf index 5622cb9..f22921f 100644 --- a/modules/cdn-profile/src/main.tf +++ b/modules/cdn-profile/src/main.tf @@ -1,7 +1,7 @@ resource "azurerm_cdn_profile" "main" { - name = "cdn-${var.zone}-${var.environment}-${lookup(local.short_locations, var.location)}-${local.identifier}" + name = "cdn-${var.zone}-${var.environment}-${local.location}-${local.identifier}" resource_group_name = var.resource_group_name - location = var.location + location = local.location sku = var.sku