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_tenant_isolation_policy resource #618

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

Conversation

mattdot
Copy link
Member

@mattdot mattdot commented Mar 5, 2025

This pull request includes several changes, primarily focusing on adding support for tenant isolation policies, updating development configurations, and improving documentation. The most important changes are summarized below:

Tenant Isolation Policy Support:

  • Added a new resource powerplatform_tenant_isolation_policy to manage tenant isolation policies. This includes the necessary API client, DTOs, and resource models. [1] [2] [3] [4]

Documentation:

  • Added detailed instructions for development tasks in .github/copilot-instructions.md, including commands for compiling code, running linters, and executing tests.
  • Created a new documentation file for the powerplatform_tenant_isolation_policy resource in docs/resources/tenant_isolation_policy.md.

Development Configuration:

  • Updated .devcontainer/devcontainer.json to include the GitHub.copilot-chat extension.
  • Modified .vscode/launch.json to add a new configuration for attaching to a process and to use the integrated terminal for debugging. [1] [2]

Linter Settings:

  • Increased the maximum number of issues per linter and the maximum number of the same issues in .golangci.yml.

Examples:

  • Added example configurations for the powerplatform_tenant_isolation_policy resource in examples/resources/powerplatform_tenant_isolation_policy/resource.tf and examples/tenant-isolation/main.tf. [1] [2]

@mattdot mattdot self-assigned this Mar 5, 2025
@mattdot mattdot linked an issue Mar 5, 2025 that may be closed by this pull request
10 tasks
@mattdot mattdot requested a review from Copilot March 5, 2025 23:54

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

Adds support for the new powerplatform_tenant_isolation_policy resource while also improving related documentation, development configurations, and linter settings.

  • Introduces API client, DTOs, and models to enable management of tenant isolation policies.
  • Provides detailed documentation and example usage for the new resource.
  • Updates development configuration files and test registration to include the new resource, and increases linter thresholds.

Reviewed Changes

File Description
docs/resources/tenant_isolation_policy.md Added documentation, example usage, and schema details for the tenant isolation policy resource.
internal/services/tenant_isolation_policy/api_tenant_isolation_policy.go Introduces the API client with methods to get and create/update tenant isolation policies, including async polling.
internal/services/tenant_isolation_policy/dto.go Defines the DTOs for tenant isolation policy, including nested properties for allowed tenants.
internal/services/tenant_isolation_policy/models.go Provides the Terraform resource model for tenant isolation policies.
.github/copilot-instructions.md Updates instructions for building, testing, and linting, ensuring developers have clear guidelines.
.golangci.yml Increases linter thresholds, adjusting the maximum issues reported per linter.
internal/provider/provider.go Registers the new tenant isolation policy resource and updates provider resources accordingly.
internal/provider/provider_test.go Updates tests to verify that the new tenant isolation policy resource is correctly registered.

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

internal/services/tenant_isolation_policy/api_tenant_isolation_policy.go:116

  • Consider adding unit tests to specifically cover the async polling logic and error paths in DoWaitForLifecycleOperationStatus to ensure it behaves correctly under different HTTP status responses and header values.
func (client *Client) DoWaitForLifecycleOperationStatus(ctx context.Context, response *api.Response) (*TenantIsolationPolicyDto, error) {
@mattdot mattdot marked this pull request as ready for review March 6, 2025 04:46
@mattdot mattdot added the ai assisted Pull requests that have be fully or partially implemented using Copilot or AI label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai assisted Pull requests that have be fully or partially implemented using Copilot or AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

powerplatform_tenant_isolation_policy resource
1 participant