feat(azure): Purview accounts (Microsoft.Purview) - #1252
Merged
Conversation
Add the Microsoft.Purview/accounts ARM control-plane service: provider mock, wire handler, resource-graph discovery (forward+inverse type maps), and snapshot support. Computed endpoints (catalog/scan/guardian), managedResources, managedResourceGroupName, identity ids, sku and provisioningState are minted deterministically and stay stable across gets/patches. ListKeys returns deterministic Atlas Kafka connection strings.
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
Adds the Microsoft.Purview/accounts ARM control-plane service (Track-1 emulation, no data plane), following the established Azure-only pattern (communication / managedgrafana / devcenter templates).
providers/azure/purview— CreateOrUpdate / Get / Delete / List (by RG + subscription) / ListKeys / PurgeResourceGroup, with snapshot/restore.server/azure/purview— ARM PUT/PATCH/GET/DELETE/list +POST /listkeys. Sync 201/200, 200-then-204 idempotent delete, 404s.ServicePurview/TypePurviewAccountwalker constants, and both forward (microsoft.purview/accounts→{purview, Account}) and inverse (purview/Account→microsoft.purview/accounts) type-map entries.from_provider+ factory wiring; docs/coverage regenerated (purview-only diff).Computed-field stability (drift-critical)
All minted once at create, stored, and byte-stable across every GET/PATCH:
endpoints.catalog/guardian/scan=https://<name>.purview.azure.com/{catalog,guardian,scan}managedResources.resourceGroup/storageAccount/eventHubNamespace— deterministic ARM ids under the managed RGmanagedResourceGroupNamedefaults tomanaged-rg-<name>when omittedidentity.principalId/tenantIdvia stableSyntheticGUIDseedssku {Standard, capacity 1},provisioningState = SucceededListKeys→ deterministicatlasKafkaPrimaryEndpoint/secondaryEndpointconnection stringsIdentity and sku are modeled explicitly (top-level, not echoed). PATCH merges only supplied fields; resource-level tag update replaces; location immutable.
E2E evidence (raw ARM, serve on :18053)
PUT→ 201 with full computed body;GET×2 → byte-identicalPATCHtags → 200, tags replaced, all computed fields + identity + managedEventHubState preserved (verified stable)POST /listkeys→ 200, stable primary≠secondary Atlas Kafka connection stringsDELETE→ 200,DELETEagain → 204,GET→ 404where type =~ "microsoft.purview/accounts"→ 1 row (forward+inverse map)Terraform
azurerm_purview_accountapply was blocked by the documented macOS azurerm TLS-trust issue at the metadata bootstrap (before reaching Purview); the raw ARM lifecycle above proves every fieldazurermreads on plan.Gates (GOMAXPROCS=3)
go build ./...,go vet,gofmt -l,golangci-lint(new pkgs = 0),go test -racenew pkgs, fullserver/azure/...providers/azure/...resourcediscoveryresourcegraphpersistsuites, rootgo test ., andgo generateidempotency — all green.