Remediation Task could not be created #722
Replies: 3 comments 1 reply
-
Hi - For the service principal that is running the pipeline, does it have the necessary Azure RBAC roles/permissions for the Azure scope that EPAC is applying policy to? Specifically wondering whether it has the required role "Role Based Access Control Administrator"
From the documentation https://azure.github.io/enterprise-azure-policy-as-code/ci-cd-app-registrations/
The following Service Principals & Role assignments would be created to support this structure:
Service Principal
Azure Role Assignment
Assignment Scope
spn-epac-plan
Reader
Tenant Root Group
spn-epac-dev
Resource Policy Contributor
Role Based Access Control Administrator
epac-contoso
spn-epac-tenant-deploy
Resource Policy Contributor
Contoso
spn-epac-tenant-roles
Role Based Access Control Administrator
Contoso
From: Lars Viding ***@***.***>
Sent: Friday, August 9, 2024 5:20 AM
To: Azure/enterprise-azure-policy-as-code ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [Azure/enterprise-azure-policy-as-code] Remediation Task could not be created (Discussion #722)
Hi, I really appreciate all help with this error.
We have EPAC up and running in our lab environment which is based on Azure DevOps (ADO) pipelines and single tenant.
We have synced in policies from ALZ and AMBA to an ALZ MG hierarchy.
Pipeline [ecap-dev] ( epac-dev-pipeline.yml) and [epac-tenant] (epac-tenant-pipeline.yml) are working.
To check remediation we have created an Azure storageacount with configuration that is not compatible with policies which are assigned via EPAC.
When manually running the pipepline [epac-remediation] (epac-remediation-pipeline.yml), it will success. But the pipeline find 29 number of non-compilant resources and it start to creating 18 number of remediation tasks.
The process is ending with bellow message.
`Remediation Task Status
18 needed
18 failed to create
0 created
0 succeded `
The error message of all 18 number of tasks is
"Remediation Task could not be created"
I really appreciate any suggestions of where we shall look for the reason why the pipeline [epac-remediation] (epac-remediation-pipeline.yml) canot create Remediation Tasks.
Thanks in advance
-
Reply to this email directly, view it on GitHub<#722>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASWPRU3SXUESMMUNGA336WLZQSXX3AVCNFSM6AAAAABMILSPUGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGAZDSNRVGA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Add more testing that I have done. As I understand it is en raw 256 in New-AzRemediationTasks.ps1 that is where this command is EQ to $null. |
Beta Was this translation helpful? Give feedback.
-
With some help from colleague, we run the remediation pipeline with checked the box of Enable system diagnostics. Which did give use debug and the verbose output.
We registered the service provider to all management group within our environment in each pacSelector deploymentRootScope and throughout each hierarchy. Then the remediation pipeline did managed to create remediation tasks. :) |
Beta Was this translation helpful? Give feedback.
-
Hi, I really appreciate all help with this error.
We have EPAC up and running in our lab environment which is based on Azure DevOps (ADO) pipelines and single tenant.
We have synced in policies from ALZ and AMBA to an ALZ MG hierarchy.
Pipeline [ecap-dev] ( epac-dev-pipeline.yml) and [epac-tenant] (epac-tenant-pipeline.yml) are working.
To check remediation we have created an Azure storageacount with configuration that is not compatible with policies which are assigned via EPAC.
When manually running the pipepline [epac-remediation] (epac-remediation-pipeline.yml), it will success. But the pipeline find 29 number of non-compilant resources and it start to creating 18 number of remediation tasks.
The process is ending with bellow message.
`Remediation Task Status
18 needed
18 failed to create
0 created
0 succeded `
The error message of all 18 number of tasks is
"Remediation Task could not be created"
I really appreciate any suggestions of where we shall look for the reason why the pipeline [epac-remediation] (epac-remediation-pipeline.yml) canot create Remediation Tasks.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions