Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
frasdav committed May 31, 2024
1 parent f4c41c9 commit 36c1f35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions modules/cdn-profile/src/locals.tf
Original file line number Diff line number Diff line change
@@ -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
}
}
4 changes: 2 additions & 2 deletions modules/cdn-profile/src/main.tf
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 36c1f35

Please sign in to comment.