Skip to content

Conversation

@CatalinDabuleanu
Copy link
Contributor

@CatalinDabuleanu CatalinDabuleanu commented Nov 20, 2025

πŸ“₯ Pull Request

❓ What are you trying to address

Add capability to fabric_workspace to assign domain id to a workspace

This closes #659

@CatalinDabuleanu CatalinDabuleanu requested a review from a team as a code owner November 20, 2025 14:29
Copilot AI review requested due to automatic review settings November 20, 2025 14:29
@github-actions
Copy link

github-actions bot commented Nov 20, 2025

Changelog Preview

v1.6.1-dev - December 03, 2025

✨ Added

  • #606 Onboard new fabric_item_job_scheduler Data Source

  • #607 Onboard new fabric_item_job_scheduler Resource

  • #637 Onboard new fabric_connection_role_assignment Data Source

  • #638 Onboard new fabric_connection_role_assignment Resource

  • #657 Added support for EntireTenant in principal_type for fabric_domain_role_assignment resource.

  • #372 Enhanced item definition processing capabilities for all resources with definition support by adding three new attributes:

    • tokens_delimiter - Allows customizing the delimiter for token substitution in source content. Supported delimiters: {{}} (default), <<>>, @{}@, ____
    • processing_mode - Enables choosing the processing mode for tokens/parameters. Options: GoTemplate (default), Parameters, None
    • parameters - Provides a structured approach for content transformation using jsonpath-replace or text-replace substitution operations
      Note: The existing tokens attribute remains unchanged for backward compatibility.
  • #629 Added provider configuration use_workspace_private_link_endpoint to allow routing workspace-scoped API requests through Workspace-level Private Link endpoints.

  • #659 Added domain_id attribute to fabric_workspace resource

  • #659 Added domain_id attribute to fabric_workspace datasource

πŸͺ² Fixed

  • #665 Update definition format to allow different file names under valueSets directory in fabric_variable_library
  • #690 Fix fabric_variable_library by improving documentation and correcting the required number of definition parts in the variable library.
  • #694 Fixed resource fabric_connection to support computed at apply time values for connection_details.parameters.name and connection_details.parameters.value
  • #741 Fix fabric_spark_workspace_settings update for default_pool

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the capability to assign a domain ID to a workspace in the fabric_workspace resource and data sources. The implementation allows users to assign, update, and unassign domains from workspaces.

Key changes:

  • Added domain_id attribute to workspace schema as an optional UUID field
  • Implemented domain assignment/unassignment logic in Create and Update operations
  • Added comprehensive test coverage for domain CRUD operations

Reviewed Changes

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

Show a summary per file
File Description
internal/services/workspace/schema.go Added domain_id SuperStringAttribute with UUID type validation, following the same pattern as capacity_id
internal/services/workspace/models.go Added DomainID field to workspace models and created assignWorkspaceToDomainRequest helper struct
internal/services/workspace/resource_workspace.go Implemented domain assignment in Create operation and domain assignment/unassignment in Update operation
internal/services/workspace/resource_workspace_test.go Added unit test for invalid UUID validation and comprehensive acceptance test for domain CRUD operations
docs/resources/workspace.md Updated resource documentation to include the new domain_id optional attribute
docs/data-sources/workspace.md Updated data source documentation to include the new domain_id read-only attribute
docs/data-sources/workspaces.md Updated data sources list documentation to include the new domain_id read-only attribute
.changes/unreleased/added-20251120-142738.yaml Added changelog entry for the new feature

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
Resource: &schemaR.StringAttribute{
Optional: true,
Computed: true,
Copy link
Member

Choose a reason for hiding this comment

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

why computed? should be removed.
in resource, it's not computed, only in datasource

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Code Coverage

Package Line Rate Complexity Health
github.com/microsoft/terraform-provider-fabric/internal/auth 84% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes 66% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/framework/planmodifiers 53% 0 βž–
github.com/microsoft/terraform-provider-fabric/internal/framework/typeutils 50% 0 βž–
github.com/microsoft/terraform-provider-fabric/internal/framework/validators 69% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/functions 75% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem 76% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/pkg/tftypeinfo 75% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/pkg/transforms 77% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/pkg/utils 85% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/provider/client 91% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/provider/config 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/provider 80% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/provider/utils 63% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/activator 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/apacheairflowjob 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/capacity 84% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/connection 72% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/connectionra 71% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/copyjob 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/dashboard 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/dataflow 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/datamart 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/datapipeline 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/deploymentpipeline 68% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/deploymentpipelinera 70% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/digitaltwinbuilder 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/domain 77% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/domainra 62% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/domainwa 71% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/environment 86% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/eventhouse 93% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/eventstream 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/eventstreamsourceconnection 83% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/folder 75% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/gateway 79% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/gatewayra 55% 0 βž–
github.com/microsoft/terraform-provider-fabric/internal/services/graphqlapi 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/itemjobscheduler 72% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/kqldashboard 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/kqldatabase 87% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/kqlqueryset 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/lakehouse 86% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/lakehousetable 80% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/mirroreddatabase 84% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/mirroredwarehouse 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/mlexperiment 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/mlmodel 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/mounteddatafactory 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/notebook 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/paginatedreport 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/report 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/semanticmodel 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/shortcut 78% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sparkcustompool 70% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sparkenvsettings 79% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sparkjobdefinition 89% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sparkwssettings 83% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sqldatabase 90% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/sqlendpoint 100% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/variablelibrary 90% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/warehouse 91% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/warehousesnapshot 90% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/workspace 79% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/workspacegit 69% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/workspacempe 77% 0 βœ”
github.com/microsoft/terraform-provider-fabric/internal/services/workspacera 76% 0 βœ”
Summary 76% (18845 / 24738) 0 βœ”

Minimum allowed line rate is 40%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Assign/Unassign Workspaces to Domain [FEAT] Domain assignment directly from resource fabric_workspace

3 participants