Skip to content

Commit

Permalink
refactor(aks): rename Terraform resources similar to other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Jan 18, 2024
1 parent 31e74f7 commit 7ddaefb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aks/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data "azurerm_resource_group" "node" {
data "azurerm_resource_group" "node_resource_group" {
count = local.use_managed_identity ? 1 : 0

name = var.logs_storage.managed_identity_node_rg_name
Expand All @@ -14,12 +14,12 @@ data "azurerm_storage_container" "container" {
resource "azurerm_user_assigned_identity" "loki" {
count = local.use_managed_identity ? 1 : 0

resource_group_name = data.azurerm_resource_group.node[0].name
location = data.azurerm_resource_group.node[0].location
name = "loki"
resource_group_name = data.azurerm_resource_group.node_resource_group[0].name
location = data.azurerm_resource_group.node_resource_group[0].location
}

resource "azurerm_role_assignment" "contributor" {
resource "azurerm_role_assignment" "storage_contributor" {
count = local.use_managed_identity ? 1 : 0

scope = data.azurerm_storage_container.container[0].resource_manager_id
Expand All @@ -31,7 +31,7 @@ resource "azurerm_federated_identity_credential" "loki" {
count = local.use_managed_identity ? 1 : 0

name = "loki"
resource_group_name = data.azurerm_resource_group.node[0].name
resource_group_name = data.azurerm_resource_group.node_resource_group[0].name
audience = ["api://AzureADTokenExchange"]
issuer = var.logs_storage.managed_identity_oidc_issuer_url
parent_id = azurerm_user_assigned_identity.loki[0].id
Expand Down

0 comments on commit 7ddaefb

Please sign in to comment.