Skip to content

Resource: Publisher#1134

Open
AdamCoulterOz wants to merge 14 commits intomicrosoft:mainfrom
AdamCoulterOz:codex/powerplatform-publisher-resource-datasource
Open

Resource: Publisher#1134
AdamCoulterOz wants to merge 14 commits intomicrosoft:mainfrom
AdamCoulterOz:codex/powerplatform-publisher-resource-datasource

Conversation

@AdamCoulterOz
Copy link
Copy Markdown
Contributor

Summary

  • add powerplatform_publisher resource and powerplatform_publisher data source for Dataverse publishers
  • model publisher addresses as up to two child address blocks mapped to Dataverse address slots
  • derive customization_option_value_prefix by default using the same algorithm as the Power Apps UI and use raw publisher GUIDs as state IDs

Testing

  • go test ./internal/services/publisher ./internal/provider
  • PATH="$(go env GOPATH)/bin:$PATH" go generate ./...
  • PATH="$(go env GOPATH)/bin:$PATH" tfplugindocs validate --provider-name powerplatform

Closes #1133

@AdamCoulterOz AdamCoulterOz requested a review from a team as a code owner April 3, 2026 10:13
Copilot AI review requested due to automatic review settings April 3, 2026 10:13
Copy link
Copy Markdown
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

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_publisher resource with Dataverse Web API CRUD, import support, and address slot modeling.
  • Implement powerplatform_publisher data source supporting lookup by id or uniquename.
  • 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)

Comment thread internal/services/publisher/resource_publisher.go Outdated
Comment thread internal/services/publisher/resource_publisher.go
Comment thread internal/services/publisher/resource_publisher_test.go
Comment thread internal/services/publisher/datasource_publisher_test.go
Comment thread .changes/unreleased/added-20260330-193000.yaml Outdated
Copy link
Copy Markdown
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Comment thread internal/services/publisher/datasource_publisher.go Outdated
Comment thread internal/services/publisher/resource_publisher.go Outdated
Copy link
Copy Markdown
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

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Comment thread internal/services/publisher/resource_publisher.go
Comment thread internal/services/publisher/api_publisher.go
Comment thread internal/services/publisher/api_publisher.go
Copy link
Copy Markdown
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

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

@AdamCoulterOz AdamCoulterOz changed the title Add Dataverse publisher resource and data source Resource: Publisher Apr 9, 2026
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.

Publisher Resource & Datasource

3 participants