Skip to content

Commit

Permalink
Fix dev cluster thanos storage account name
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Feb 19, 2024
1 parent 12be416 commit ff4d6db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/terraform_kubernetes/thanos.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "azurerm_storage_account" "thanos" {

name = "${var.resource_prefix}${var.cluster_short}thanossa"
name = "${var.resource_prefix}${local.cluster_sa_name}thanossa"
location = data.azurerm_resource_group.resource_group.location
resource_group_name = data.azurerm_resource_group.resource_group.name
account_tier = "Standard"
Expand Down
5 changes: 5 additions & 0 deletions cluster/terraform_kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,9 @@ locals {
storage-account-name = azurerm_storage_account.thanos.name
storage-account-key = azurerm_storage_account.thanos.primary_access_key
}

cluster_sa_name = (var.environment == var.config ?
var.cluster_short : # pt,ts or pd
var.environment # cluster1, cluster2, etc
)
}

0 comments on commit ff4d6db

Please sign in to comment.