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

[SCLabelPolicy] Labels aren't updated on existing policies when using Labels property #3216

Closed
ykuijs opened this issue Apr 25, 2023 · 1 comment · Fixed by #3218 or #3229
Closed
Assignees
Labels

Comments

@ykuijs
Copy link
Member

ykuijs commented Apr 25, 2023

Details of the scenario you tried and the problem that is occurring

When you want to update an existing label policy, the resource doesn't do anything when using the Labels property. This is because the Labels parameter is removed in the code, since the Set-LabelPolicy cmdlet doesn't support the Labels parameter.

Verbose logs showing the problem

N/A

Suggested solution to the issue

We need to change the code to populate the AddLabels/RemoveLabels, based on the labels specified in Labels and the actually applied labels

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

Dev

@ykuijs ykuijs added Bug Something isn't working Security & Compliance Center labels Apr 25, 2023
@ykuijs ykuijs self-assigned this Apr 25, 2023
@ykuijs
Copy link
Member Author

ykuijs commented Apr 25, 2023

Working on it.

Also updated the code to check if Labels and AddLabels/RemoveLabels are provided. These can't be used simultaneously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant