Skip to content

[FEAT] Add support for shortcutConflictPolicy in Shorcuts #765

@cseHdz

Description

@cseHdz

🚀 Feature description

When creating OneLake shortcuts in Fabric workspaces, I want to specify the shortcutConflictPolicy so I can control how the provider handles existing shortcuts with the same name (e.g., abort, overwrite, or generate unique names).

🔈 Motivation

The current Terraform provider doesn't expose the shortcutConflictPolicy parameter available in the Fabric REST API. This limits control over conflict resolution behavior during shortcut creation, forcing users to manually handle conflicts or work around the limitation.

🛰 Alternatives

  • Manually delete conflicting shortcuts before applying Terraform configurations
  • Use the REST API directly outside of Terraform for shortcut creation

🚧 Potential Configuration / Desired Solution

resource "fabric_shortcut" "onelake" {
  workspace_id = "00000000-0000-0000-0000-000000000000"
  item_id      = "00000000-0000-0000-0000-000000000000"
  name         = "MyShortcutName"
  find         = "MyShortcutPath"
  target = {
    onelake = {
      workspace_id = "00000000-0000-0000-0000-000000000000"
      item_id      = "00000000-0000-0000-0000-000000000000"
      find         = "MyTargetPath"
    }
  }
 shortcut_conflict_policy = "Abort" # Valid values: "Abort", "Overwrite", "GenerateUniqueName"
}

📎 Additional context

Reference: Fabric REST API - shortcutConflictPolicy

Current Implementation: resource_shortcut.go (line 163)

☑️ Acceptance Criteria

  • Add shortcut_conflict_policy optional attribute to the fabric_shortcut resource
  • Support all three policy values: Abort, Overwrite, GenerateUniqueName
  • Default behavior matches Fabric API default (Abort) when not specified
  • Documentation updated with examples and valid values

🔰 Code of Conduct

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

Metadata

Metadata

Labels

featureNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions