Description
Adding a partner_id
setting to the Power Platform Terraform provider will let solution partners pass the same Customer Usage Attribution (CUA) GUID that AzureRM and AzAPI already honor, so deployments built with the new provider can be report analytics just like ARM‑based workloads.
User Story
As a partner engineer deploying Power Platform resources with Terraform
I want the provider block to accept an optionalpartner_id = "<GUID>"
argument (or to read it from theARM_PARTNER_ID
environment variable)
So that Microsoft can attribute the consumed Power Platform usage to my organization under the existing Customer Usage Attribution program, enabling accurate ACR/PAL reporting and partner incentive recognition.
Acceptance Criteria
-
Provider schema
- New optional
partner_id
argument of type string; must validate as a GUID. - When omitted, provider behaves exactly as today.
- When supplied, the value is propagated on every ARM REST call via appending
pid-<GUID>
to theuser-agent
header, matching the AzAPI/AzureRM convention.
- New optional
-
Environment variable parity
- If
partner_id
is not set in Terraform code, the provider readsARM_PARTNER_ID
orPOWER_PLATFORM_PARTNER_ID
. - If both are set, the explicit provider block value wins (aligns with AzureRM behavior).
- If
-
Telemetry safeguards
- Add
disable_terraform_partner_id
boolean flag (default false) mirroring AzAPI, allowing users to opt‑out. This prevents sending the default222c6c49-1b0a-5959-a213-6608f9eb8820
terraform partner id if a custom partner id is not supplied
- Add
-
Documentation & examples
- Registry docs include explanation of CUA, a sample provider block, and links to Partner Center guidance.
- Tests
- Unit test: provider initializes when
partner_id
is present and validates GUID format. - Acceptance test: verifies that the header is sent on an environment resource create call.
- Unit test: provider initializes when
Implementation Notes
- Follow the pattern in AzureRM (
partner_id
in provider schema). - Header syntax must be
pid-<GUID>
per CUA spec; avoid sending raw GUIDs. - Keep the feature behind a minor‑version bump (
v1.x → v1.(x+1)
) to preserve API compatibility.
Activity
mattdot commentedon Apr 24, 2025
Refer to https://github.com/microsoft/terraform-provider-fabric/pull/408/files#