-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(arm): arm custom policy support #6769
Conversation
@@ -29,12 +29,14 @@ def build_graph(self, render_variables: bool = False) -> None: | |||
self._create_vertices() | |||
logging.debug(f"[ArmLocalGraph] created {len(self.vertices)} vertices") | |||
|
|||
self._create_edges() | |||
logging.debug(f"[ArmLocalGraph] created {len(self.edges)} edges") | |||
self._create_vars_and_parameters_edges() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a part of the create_edges
function from line 37?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the variable rendering needs to happen before the creation of the edges since some of the dependencies names can be brought from variables or parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it work the other way around as well? meaning you might be missing variables to render if you didn't compute all edges first?
In terraform the order is "vertices->edges->render-vars", but I'm not sure this should also apply here, just to understand this is the correct order.
Also - if it is here specifically for that, it should probably be documented in the code as well that this part should be before variable renedering. Perhaps in the name of the function as well, as it's confusing that you have a specific case of create edges which should not run as part of the general create_edges
function
* arm custom policy support
User description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist:
Generated description
Dear maintainer, below is a concise technical summary of the changes proposed in this PR:
Introduce support for custom ARM policies by enhancing the ARM graph builder and integrating it with the custom policies framework. The
ArmLocalGraph
class is updated to handle both explicit and implicit dependencies, improving the graph's accuracy. New utility functionsextract_resource_name_from_resource_id_func
andextract_resource_name_from_reference_func
are added to facilitate resource name extraction. TheCustomPoliciesIntegration
class now includes ARM in its supported frameworks, allowing custom ARM policies to be registered and validated.Modified files (2)
Latest Contributors(1)
Modified files (3)
Latest Contributors(2)
Modified files (4)
Latest Contributors(2)
Modified files (7)
Latest Contributors(1)