You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current suggested structure includes policy.json, policy.parameters.json, and policy.rules.json.
The policy file includes sections for parameters and rules; and the content of these in all examples I've seen typically duplicate exactly what's in the .parameters and .rules files.
To me it would make sense to only maintain these definitions in one place; then if a different format were needed use scripts to generate these other files; but to avoid including that generated content under source control (i.e. only include the single definition file and the scripts to perform the conversion).
I couldn't see anything in the document explaining why we may wish to have this duplication / if some of the content is expected to be generated, but included in the .gitignore file to prevent it from being tracked in the repo itself. Please could something be added to clarify this?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 50f6b34e-7ed0-5ecd-6cf4-192e7393663c
Version Independent ID: cb186c12-22a3-5ac4-667c-b1d07ab5f566
@JohnLBevan Thanks for the question! The structure is partially to help with some of the SDK functions that take those components as a standalone file. For example, in Azure CLI the command for creating a policy assignment, az policy assignment create, uses a params (or p) parameter that expects a JSON string or path of just the parameter node. While you could add extra steps in your pipeline to shard the "core" file that has this information, the team felt it was a cleaner path to have each file used as part of the source. I'll ping one of the PMs to see if this approach still holds.
Confirmed that this approach still stands and is recommended. I'm going to close this issue now. Feel free to open a new Issue for any Docs issues you see. Thanks!
The current suggested structure includes
policy.json
,policy.parameters.json
, andpolicy.rules.json
.The policy file includes sections for parameters and rules; and the content of these in all examples I've seen typically duplicate exactly what's in the
.parameters
and.rules
files.To me it would make sense to only maintain these definitions in one place; then if a different format were needed use scripts to generate these other files; but to avoid including that generated content under source control (i.e. only include the single definition file and the scripts to perform the conversion).
I couldn't see anything in the document explaining why we may wish to have this duplication / if some of the content is expected to be generated, but included in the
.gitignore
file to prevent it from being tracked in the repo itself. Please could something be added to clarify this?Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: