microsoft / terraform-provider-power-platform

Power Platform Terraform Provider
https://registry.terraform.io/providers/microsoft/power-platform/latest/docs
MIT License
35 stars 14 forks source link

Implement Solution Checker for Managed Environments #116

Open eduardodfmex opened 1 year ago

eduardodfmex commented 1 year ago

Solution Checker for Managed environments

Managed environments requires the configuration of Solution checker, You can use solution checker in Managed Environments to enforce rich static analysis checks on your solutions against a set of best practice rules and identify problematic patterns.

Solution Checker enforcement description

Automatically verify solution checker results for security and reliability issues before solution import. Learn more

Solution Checker ask for 3 kinds of enforcement:

• None, Turn off solution checker verification during solution import. You can continue to manually review the results in the solution explorer. • Warm, Check for security and reliability issues in the solution checker results, but do not block solution import for any issues. • Block, Check for security and reliability issues in the solution checker results and block the solution from being imported if critical issues are found.

Rule exclusions / Excluded Rules

You can select to exclude solution checker rules from enforcement. For example, a particular rule might take significant time and effort to fix across the solution, but you would still like the rest of the rules to be enforced. Use the Excluded Rules dropdown list to select the rules to exclude from enforcement.

Image

The list contains rule names and descriptions grouped by category and sorted by severity. As a reminder, only critical severity rules block a solution from being imported.

Image

Excluded Rules for Managed Environments Image

Useful links: Solution checker enforcement in Managed Environments - Power Platform | Microsoft Learn Use solution checker to validate your solutions - Power Apps | Microsoft Learn

Resource

Potential Terraform Configuration

# Sample Terraform config that describes how the new resource might look.

resource "example_resource" {
  name = "example"
  parameter1 = "value1"
  parameter2 = "value2"
}

Definition of Done

Contributions

Do you plan to raise a PR to address this issue?

See the contributing guide for more information about what's expected for contributions.

eduardodfmex commented 1 year ago

Solution checker documentation: https://learn.microsoft.com/en-us/power-platform/admin/managed-environment-solution-checker

eduardodfmex commented 1 year ago

And also consider: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/common-issues-resolutions-solution-checker

leighatami commented 1 year ago

@eduardodfmex can you add more context/information? this looks only partially filled out

eduardodfmex commented 11 months ago

@leighatami I add more description to this.

webstean commented 2 months ago

The provider already allows you to basically enable or disabled the Automatic Solution Check, as per below.

resource "powerplatform_managed_environment" "managed_development" {
  ...
  ## Options available: None, Warn, Block
  solution_checker_mode      = "None"
}

This issue is about fine tuning the exact rules that the Solution Check will actually check, and there are lots of options, so it would be a lot of effort to create, test and document these, for what I think are very edge use-cases. Not sure it is worth the effort IMHO.