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

powerplatform_data_loss_prevention_policy added additional validation for default_action_rule_behavior and action_rules when both are empty #524

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

mawasile
Copy link
Contributor

This pull request includes several updates and improvements to the Data Loss Prevention Policy functionality, primarily focusing on schema enhancements and validation logic. The most important changes include adding additional validation for default_action_rule_behavior and action_rules, updating the Go module version, and refining the schema attributes by removing redundant descriptions.

Validation Enhancements:

  • Added validation logic to ensure default_action_rule_behavior and action_rules are correctly configured when both are empty. (internal/services/dlp_policy/resource_dlp_policy.go)

Schema Attribute Refinements:

  • Removed redundant Description fields from schema attributes in DataLossPreventionPolicyDataSource and DataLossPreventionPolicyResource. (internal/services/dlp_policy/datasource_dlp_policy.go) [1] [2] [3] [4] [5]
  • Added MarkdownDescription to provide more detailed information and links to relevant documentation. (internal/services/dlp_policy/datasource_dlp_policy.go, internal/services/dlp_policy/resource_dlp_policy.go) [1] [2]

Module and Dependency Updates:

  • Updated Go module version to 1.22.9 in go.mod file. (go.mod)

New Helper Functions:

  • Introduced getConnectorGroup function to handle conversion of connector attributes. (internal/services/dlp_policy/helpers.go)

Configuration Validation:

  • Implemented ValidateConfig method in DataLossPreventionPolicyResource to ensure proper configuration of connectors. (internal/services/dlp_policy/resource_dlp_policy.go)

github-actions[bot] and others added 12 commits November 12, 2024 17:23
…ion_policy-produces-errors-while-successfully-provisioning-dlp-policies
…produces-errors-while-successfully-provisioning-dlp-policies' of https://github.com/microsoft/terraform-provider-power-platform into mawasile/518-powerplatform_data_loss_prevention_policy-produces-errors-while-successfully-provisioning-dlp-policies
…ion_policy-produces-errors-while-successfully-provisioning-dlp-policies
…ion_policy-produces-errors-while-successfully-provisioning-dlp-policies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-acceptance-tests PR tag for triggering acceptance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

powerplatform_data_loss_prevention_policy produces errors, while successfully provisioning DLP policies
1 participant