Azure / Azure/Azure-Landing-Zones
Add wiki documentation on how to manage excluded scopes in the policy assignment
- Dominant language
- PowerShell
- Stars
- 97
- Forks
- 70
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 7
Description
### Community Note
- Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
### Description
#### Is your feature request related to a problem?
This module works great. However, how to manage excluded scopes in the policy assignment is undocumented.
A few issues have been created around the same topic e.g Azure/Azure-Landing-Zones#3920 , Azure/Azure-Landing-Zones#2911
Documenting this would be a great addition. Thanks.
#### Describe the solution you'd like
Building on this below. And uses case for Subscription, resource group(s), resource and MG exclusion. thanks
Ensure you have [setup a custom library](https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/wiki/%5BVariables%5D-library_path) within your root module.
Create a copy of the Policy Assignment you would like to add exclusions to in your custom library, ensuring you maintain the required naming convention matching **/policy_assignment_*.{json,yml,yaml}. The module will use any templates
To keep things simple at this point, we will assume you retain the original Policy Assignment name(s) but note that you can use different names and then add the new assignments by [extending the existing archetype definition (https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/wiki/%5BExamples%5D-Expand-Built-in-Archetype-Definitions) with your new Policy Assignment(s), or by [creating a new custom archetype definition](https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/wiki/%5BUser-Guide%5D-Archetype-Definitions) using one of the supported approaches.
Edit your copy of the Policy Assignment(s) in your custom library, adding the required value(s) to the not_scopes field.
#### Additional context
Contributor guide
Research direction
Start with the linked custom library, expanded archetype, and custom archetype wiki pages, then review the described policy_assignment_*.json/yml/yaml template flow. Document how to copy a policy assignment, set not_scopes, and cover subscription, resource group, resource, and management group exclusions. Done means the wiki contains clear, working examples for each requested scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform
- Domain
- cloud, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100