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

Implement Solution Checker for Managed Environments #116

Open
13 tasks
eduardodfmex opened this issue Nov 7, 2023 · 6 comments · May be fixed by #567
Open
13 tasks

Implement Solution Checker for Managed Environments #116

eduardodfmex opened this issue Nov 7, 2023 · 6 comments · May be fixed by #567
Assignees
Labels
enhancement New feature or request resource terraform resource
Milestone

Comments

@eduardodfmex
Copy link
Contributor

eduardodfmex commented Nov 7, 2023

Solution Checker for Managed environments

When converting an environment to managed, the "Solution checker enforcement" option allows us to enable tests when importing solutions into the managed environment.

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.

Send emails only when a solution is blocked. If unchecked, you'll also get emails when there are warnings.

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

  • Resource Name: powerplatform_[your resource name]
  • API documentation:
  • Estimated complexity/effort:
  • Related resources/data sources:

Potential Terraform Configuration

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

resource "powerplatform_managed_environment" "managed_development" {
  environment_id             = powerplatform_environment.development.id
  is_usage_insights_disabled = true
  is_group_sharing_disabled  = true
  limit_sharing_mode         = "ExcludeSharingToSecurityGroups"
  max_limit_user_sharing     = 10
  solution_checker_mode      = "None" # this could de none, warm or block
  solution_checker_excluded_rules = [
     "rule_01", "rule_02"]
  suppress_validation_emails = true
  maker_onboarding_markdown  = "this is example markdown"
  maker_onboarding_url       = "https://www.microsoft.com"
}

Definition of Done

  • Verify how this affects the environment groups, EG also so Solution check https://learn.microsoft.com/en-us/power-platform/admin/environment-groups
  • Data Transfer Objects (dtos)
  • Data Client functions
  • Resource Implementation
  • Resource Added to Provider
  • Unit Tests for Happy Path
  • Unit Tests for error path
  • Acceptance Tests
  • Example in the /examples folder
  • Schema Documentation in code
  • Updated auto-generated provider docs with make docs

Contributions

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

  • Yes
  • No

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

@eduardodfmex
Copy link
Contributor Author

@eduardodfmex
Copy link
Contributor Author

@leighatami
Copy link
Contributor

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

@leighatami leighatami added this to the GA milestone Nov 7, 2023
@eduardodfmex eduardodfmex self-assigned this Dec 4, 2023
@eduardodfmex
Copy link
Contributor Author

@leighatami I add more description to this.

@mattdot mattdot modified the milestones: GA, Public Preview Dec 7, 2023
@mattdot mattdot modified the milestones: Public Preview, GA Mar 4, 2024
@webstean
Copy link
Contributor

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.

@eduardodfmex
Copy link
Contributor Author

eduardodfmex commented Jan 24, 2025

Solution checker works with unmanaged solutions that can be exported from an environment.

With the solution checker feature, you can perform a check within seconds on your solution, which uses a set of best practice rules to quickly identify problematic patterns. After the check completes, you receive a detailed report in Power Apps as well as in an email message that lists the issues identified, the components and code affected, and links to documentation that describes how to resolve each issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request resource terraform resource
Projects
None yet
4 participants