Skip to content

[BUG] data "fabric_workspace" requires Fabric Capacity admin #743

@slawchod

Description

@slawchod

🐛 What happened?

I'm running pipeline using Managed Identity having Workspace Contributor rights on "Workspace-Team1-2-DEV" workspace.

I expect that data "fabric_workspace" will return information about workspace without necessity of having Fabric Capacity Admin rights (which quite often is shared).

🔬 How to reproduce?

  1. Grant account Contributor only for the workspace.
  2. Allow account in developer settings for API queries.
  3. Run TF code
data "fabric_workspace" "workspace_details" {
 display_name = "Workspace-Team1-2-DEV"
}
  1. It will end up with error:

    │ Error: Read operation

    │ with data.fabric_workspace.workspace_details,
    │ on main.tf line 3, in data "fabric_workspace" "workspace_details":
    │ 3: data "fabric_workspace" "workspace_details" {

    │ Unable to find Capacity with 'id': 4a4c7882-d123-4c99-b9da-11111111

  2. After granting for the same user Fabric Capacity Admin role, the code executes properly and returns workspace details:

🏗️ Code Sample / Log

code:

data "fabric_workspace" "workspace_details" {
 display_name = "Workspace-Team1-2-DEV"
}

error:

│ Error: Read operation
│ 
│   with data.fabric_workspace.workspace_details,
│   on main.tf line 3, in data "fabric_workspace" "workspace_details":
│    3: data "fabric_workspace" "workspace_details" {
│ 
│ Unable to find Capacity with 'id': 4a4c7882-d123-4c99-b9da-11111111

📷 Screenshots

No response

📈 Expected behavior

Account having workspace level permission, should be able to read workspace details without necessity of having admin rights on the Fabric Capacity.

🌌 Environment (Provider Version)

1.6.0

🌌 Environment (Terraform Version)

1.12.2

🌌 Environment (OS)

Linux

📎 Additional context

No response

🔰 Code of Conduct

  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions