Skip to content
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

fix(convert-config): Remove warning for ssm-remediation with nested ous in convert-config #1249

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2567,14 +2567,15 @@ export class ConvertAseaConfig {
}
//validation to ensure rules with remediation via ssm have document to deployed to matching ou's
for (const rule of rulesWithTarget) {
const deploymentOuListWithNestedOus = this.getNestedOusForDeploymentTargets(rule.deployTo ?? []);
if (rule.remediation && rule.remediation.targetId) {
for (const documentSet of this.documentSets) {
for (const document of documentSet.documents) {
if (document.name === rule.remediation.targetId) {
for (const target of documentSet.shareTargets.organizationalUnits ?? []) {
if (!rule.deployTo?.includes(target)) {
if (!deploymentOuListWithNestedOus.includes(target)) {
this.configCheck.addWarning(
`SSM Remediation document ${document.name} is not deployed to the same OU ${target} as the config rule ${rule.name}.`,
`SSM Remediation document ${document.name} is not deployed to the same OU ${target} as the config rule ${rule.name} in ${deploymentOuListWithNestedOus}.`,
);
}
}
Expand Down
Loading