powerplatform_data_loss_prevention_policy
produces errors, while successfully provisioning DLP policies
#518
Labels
bug
Something isn't working
Describe the bug
powerplatform_data_loss_prevention_policy
can fail due to unexpected state. In the sample code, this happens both if a new DLP policy is being provisioned, or an existing DLP policy is being modified. New policies are successfully created, with all specified connectors properly categorized.Sample Terraform Code
Slightly modified version of the example for DLP policy resource
Expected behavior
As mentioned, the connectors are successfully created despite the error messages (see following section). I would expect that, if there are errors generated that the action fails to create these resources, or if the creation is successful then warning messages are supplied instead, especially if these warning messages can provide clarity on what the root cause of the issue is.
Additional context
Here are the errors caused by a sample run of the above terraform. This was ran as part of a main that also spin up a few environments, environment groups, etc. in a long standing power platform tenant.
These errors were generated from a run with no existing tfstate or DLP policies in the tenant.
It appears that after apply the DLP automatically gets a few (23-24) connectors added to the policy, but additionally some connectors are described as "not correlating with any element in actual." Unsure what the "Actual" is in question, as these connectors and policies are fully present in the DLP policy after the application step errors out.
Contribution
Do you plan to raise a PR to address this issue? No, not at this time
The text was updated successfully, but these errors were encountered: