aws-deployment-framework icon indicating copy to clipboard operation
aws-deployment-framework copied to clipboard

Feat/policy refactor (#3) (v4.0.0 compatible)

Open StewartW opened this issue 8 months ago • 1 comments

Why?

A refactor of how policies (SCP/Tagging) are managed.

Provides backwards compatibility with the current process whilst enabling an additional folder "adf-policies" that allows for SCPs, Tagging policies (and potentially more) to be defined in a central location. Allowing for policies to be-used across multiple targets. (Currently supports OU-names, but also supports extension going forward)

Issue #, if available: What?

Description of changes:

Creates a new concept called Policy Campaigns. Which is an object used to orchestrate the updating of policies and their targets.

Policy Campaigns have a list of Policies that require creating. (A policy is classed as requiring creation when a policy with the same name does not exist). Policies that require updating (A policy is classed as requiring updating when an existing policy has a different content) and policies that require deleting (Any policy that is ADF managed but does not receive an interaction throughout the campaign is considered for deletion)

Policies themselves do similar logic for targets, and depending on the adf config, a target will either have the default SCP maintained or removed.

The overall logic is the same for the legacy policy management, the primary difference is that adf-policies is now an optional source for policies.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

StewartW avatar Jun 14 '24 15:06 StewartW