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 + ] +}