From 41695fddc86c8bca3e1eb808e2987bdaca7b2ea7 Mon Sep 17 00:00:00 2001 From: Thomas Thornton <> Date: Fri, 22 Mar 2024 15:44:38 +0000 Subject: [PATCH] add app gw container --- Terraform-AZURE-Services-Creation/AKS/rbac.tf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Terraform-AZURE-Services-Creation/AKS/rbac.tf b/Terraform-AZURE-Services-Creation/AKS/rbac.tf index c798afd..d2a4716 100644 --- a/Terraform-AZURE-Services-Creation/AKS/rbac.tf +++ b/Terraform-AZURE-Services-Creation/AKS/rbac.tf @@ -26,4 +26,14 @@ resource "azurerm_role_assignment" "acr_pull" { depends_on = [ azurerm_kubernetes_cluster.k8s ] -} \ No newline at end of file +} + +resource "azurerm_role_assignment" "appgwcontainer" { + principal_id = azurerm_user_assigned_identity.alb_identity.principal_id + scope = data.azurerm_resource_group.resource_group.name.id + role_definition_name = "reader" + depends_on = [ + azurerm_kubernetes_cluster.k8s, + azurerm_user_assigned_identity.alb_identity + ] +}