Open
Conversation
…update/delete methods
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Dataverse publishers by introducing a new powerplatform_publisher Terraform resource and matching data source, including nested address-slot mapping and default derivation for customization_option_value_prefix.
Changes:
- Implement
powerplatform_publisherresource with Dataverse Web API CRUD, import support, and address slot modeling. - Implement
powerplatform_publisherdata source supporting lookup byidoruniquename. - Register the new resource/data source in the provider and add examples + generated docs + changelog entry.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/services/publisher/resource_publisher.go | Resource schema + CRUD/import + address/prefix mapping helpers |
| internal/services/publisher/api_publisher.go | Dataverse Web API client for publishers (create/read/update/delete + lookup) |
| internal/services/publisher/datasource_publisher.go | Data source schema + read logic (id/uniquename) |
| internal/services/publisher/models.go | Resource/data source models + address model |
| internal/services/publisher/dto.go | DTOs for publisher entity + collection wrapper |
| internal/services/publisher/resource_publisher_test.go | Unit CRUD/import coverage for resource via httpmock |
| internal/services/publisher/datasource_publisher_test.go | Unit read coverage for data source via httpmock |
| internal/services/publisher/resource_publisher_mapper_test.go | Unit coverage for mapping/derivation edge cases |
| internal/provider/provider.go | Registers new resource + data source |
| internal/provider/provider_test.go | Ensures provider exposes new resource + data source |
| examples/resources/powerplatform_publisher/resource.tf | Resource usage example |
| examples/resources/powerplatform_publisher/outputs.tf | Example output |
| examples/resources/powerplatform_publisher/import.sh | Import example using composite ID |
| examples/data-sources/powerplatform_publisher/data-source.tf | Data source usage example |
| examples/data-sources/powerplatform_publisher/outputs.tf | Example output |
| docs/resources/publisher.md | Generated resource docs |
| docs/data-sources/publisher.md | Generated data source docs |
| .changes/unreleased/added-20260330-193000.yaml | Changie entry for the new feature |
| CONTEXT.md | Added repo/branch context notes (non-functional) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
powerplatform_publisherresource andpowerplatform_publisherdata source for Dataverse publishersaddressblocks mapped to Dataverse address slotscustomization_option_value_prefixby default using the same algorithm as the Power Apps UI and use raw publisher GUIDs as state IDsTesting
Closes #1133