Skip to content

Conversation

@CatalinDabuleanu
Copy link
Contributor

…der_flow Data Source and Resource

📥 Pull Request

❓ What are you trying to address

Onboard new fabric_digital_twin_builder_flow Data Source and Resource. This closes #661 #662

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 onboards a new fabric_digital_twin_builder_flow Data Source and Resource to the Terraform provider for Microsoft Fabric, adding support for managing Digital Twin Builder Flow items.

  • Implements the Digital Twin Builder Flow resource with full CRUD operations
  • Adds corresponding data sources for both single and multiple Digital Twin Builder Flows
  • Includes comprehensive test coverage for both unit and acceptance tests

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/services/digitaltwinbuilderflow/base.go Defines core constants and configuration for Digital Twin Builder Flow item type
internal/services/digitaltwinbuilderflow/resource_digital_twin_builder.go Implements the resource configuration for Digital Twin Builder Flow
internal/services/digitaltwinbuilderflow/data_digital_twin_builder_flow.go Implements single Digital Twin Builder Flow data source
internal/services/digitaltwinbuilderflow/data_digital_twin_builder_flows.go Implements multiple Digital Twin Builder Flows data source
internal/provider/provider.go Registers the new resources and data sources with the provider
examples/ Provides usage examples for the new resources and data sources
docs/ Auto-generated documentation for the new functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Sep 22, 2025

Changelog Preview

v1.7.1-dev - December 12, 2025

✨ Added

  • #661 Onboard new fabric_digital_twin_builder_flow Data Source
  • #662 Onboard new fabric_digital_twin_builder_flow Resource

"definition.json" = {
source = "${local.path}/definition.json.tmpl"
tokens = {
"DIGITAL_TWIN_BUILDER_ID" = "Item ID of the parent lakehouse that exists in the workspace"
Copy link
Contributor

Choose a reason for hiding this comment

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

replace with 11111111-1111-1111-1111-111111111111 instead of the description since it's an id

DefinitionFormats: itemDefinitionFormats,
}

return fabricitem.NewResourceFabricItemDefinition(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that the digital twin builder flow can have either creationPayload or definition and that the dataflow object has also the properties attribute, so NewResourceFabricItemConfigDefinitionProperties should be used
(https://learn.microsoft.com/en-us/rest/api/fabric/digitaltwinbuilderflow/items/create-digital-twin-builder-flow?tabs=HTTP#response)

DefinitionFormats: itemDefinitionFormats,
}

return fabricitem.NewDataSourceFabricItemDefinition(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

the digital twin builder flow also has properties, so NewDataSourceFabricItemDefinitionProperties should be used. add the corresponding properties model and setter

}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add an example for creationPayload

FabricItemType: FabricItemType,
}

return fabricitem.NewDataSourceFabricItems(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

same as the others, it's an item with properties so NewDataSourceFabricItemsProperties should be used

}))
}

func TestAcc_DigitalTwinBuilderFlowResource_CRUD(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be easier to follow if you split this testing func into 3 different functions, one for item with definition, without definition and with configuration (see eventhouse for eg)

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.

[DS] Add Digital Twin Builder Flow Data Source

3 participants