-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for user managed identity for policy assignments (re-submission) #867
Conversation
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
The tests fail - this is why the original PR was reverted. Please can you investigate?
|
@matt-FFFFFF can you confirm this is the tests the failed pipeline was running? if it is the case I will repro locally and fix |
Correct |
@matt-FFFFFF managed to reproduce and fix. |
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
|
a34bcb9
to
6a6b384
Compare
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run update |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run update |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run unit |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi Laurent and Team, After merge the user assigned identity code to entraprice scale master repo, still we are facing the issue if we put the user assigned identity in the policy assignment. Could someone help on this on /home/vscode/.terraform.cache/singtel-dev/rover_jobs/20240604071653261147708/modules/enterprise_scale/resources.policy_assignments.tf line 28, in resource "azurerm_management_group_policy_assignment" "enterprise_scale": -- 04-Jun-2024 15:17:59 | 28: if lower(iv) == "systemassigned" 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | Invalid value for "str" parameter: string required. 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | Error: Invalid function argument 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | on /home/vscode/.terraform.cache/singtel-dev/rover_jobs/20240604071653261147708/modules/enterprise_scale/resources.policy_assignments.tf line 28, in resource "azurerm_management_group_policy_assignment" "enterprise_scale": 04-Jun-2024 15:17:59 | 28: if lower(iv) == "systemassigned" 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | Invalid value for "str" parameter: string required. 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | Error: Invalid function argument 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | on /home/vscode/.terraform.cache/singtel-dev/rover_jobs/20240604071653261147708/modules/enterprise_scale/resources.policy_assignments.tf line 28, in resource "azurerm_management_group_policy_assignment" "enterprise_scale": 04-Jun-2024 15:17:59 | 28: if lower(iv) == "systemassigned" 04-Jun-2024 15:17:59 | 04-Jun-2024 15:17:59 | Invalid value for "str" parameter: string required. |
If someone can join the call and let us know how we can pass the template file in the CAF for user assigned managed identity issue will be resolve. Please help on the issue |
Error: 4 | Error: Error in function call -- | -- 04-Jun-2024 23:28:24 | 04-Jun-2024 23:28:24 | on /home/vscode/.terraform.cache/singtel-dev/modules/enterprise_scale/modules/archetypes/locals.policy_assignments.tf line 30, in locals: 04-Jun-2024 23:28:24 | 30: filepath => jsondecode(templatefile("${local.custom_library_path}/${filepath}", local.template_file_vars)) 04-Jun-2024 23:28:24 | ├──────────────── 04-Jun-2024 23:28:24 | │ local.custom_library_path is "../../../../platform/components/lib" 04-Jun-2024 23:28:24 | │ local.template_file_vars is object with 25 attributes 04-Jun-2024 23:28:24 | 04-Jun-2024 23:28:24 | Call to function "jsondecode" failed: invalid character 'f'. |
Overview/Summary
Addresses a PR merge regression -> #806 (comment)
Azure policies who implement a deploy if not exist (DINE policies) require an identity to have the right permission to deploy the missing resources. By leveraging the user managed identities, customers can reduce the number of system identities created by the assignments by using a user managed identity. The other benefit of using a user managed identity is the decouple the role assignment from the policy.
This PR fixes/adds/changes/removes
Breaking Changes
no breaking changes
Testing Evidence
Updated examples/400-multi-with-orchestration to show how to modify an existing policy assignment from SystemAssigned to UserAssigned
As part of this Pull Request I have
main
branch