Migrate PolicyGroup to infer - #837
Draft
iwahbe wants to merge 1 commit into
Draft
Conversation
Contributor
Does the PR have any schema changes?Found 1 breaking change: Types
Maintainer note: consult the runbook for dealing with any breaking changes. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #837 +/- ##
==========================================
- Coverage 52.18% 50.59% -1.59%
==========================================
Files 82 82
Lines 9598 9514 -84
==========================================
- Hits 5009 4814 -195
- Misses 4117 4240 +123
+ Partials 472 460 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Metabase shows that an |
Replaces the manual `PulumiServicePolicyGroupResource` implementation with an infer-based resource. The Cloud API contract is unchanged: entityType, mode, name, and organizationName still force replacement; stacks, accounts, and policyPacks update in-place via the existing batch endpoint; child accounts are still skipped on remove when their parent is still in the input set. Update sends each batch op in its own request to dodge the Cloud's reorder/upsert-by-name behavior, recovering real state for the checkpoint if a mid-batch op fails. Policy-pack equality compares config, treating a nil and an empty config map as equal. Removes the now-unused schema blocks (`PolicyGroup`, `PolicyGroupStackReference`, `PolicyGroupPolicyPackReference`, `PolicyGroupPolicyPackReferenceInput`) from `manual-schema.json`; the infer framework regenerates them from the Go struct definitions. The generated SDK `version` field is now typed as `integer` rather than `number`, matching the API client's `int` type.
iwahbe
force-pushed
the
iwahbe/migrate-policy-group
branch
from
June 9, 2026 15:59
5b4f16c to
33cec2c
Compare
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
PolicyGroupresource to theinferframework, replacingthe legacy gRPC
PulumiServicePolicyGroupResourceimplementation.PolicyGroup,PolicyGroupStackReference,PolicyGroupPolicyPackReference, andPolicyGroupPolicyPackReferenceInputschema blocks from
manual-schema.json; infer regenerates them from theGo struct definitions.
stacks/accounts/policyPacks, child-account skip-on-remove when the parent
is still in the input set,
version-strip in Check so legacy programsthat still set the server-derived field upgrade cleanly, and
replaceOnChanges for name / organizationName / entityType / mode.
Updatesends each batch op in its own request to dodge the Cloud'sreorder/upsert-by-name behavior, and recovers the real state for the
checkpoint if a mid-batch op fails; policy-pack equality compares config,
treating a nil and an empty config map as equal.
Notes
versionfield changes fromnumbertointeger, matching the API client'sintfield. This is aminor SDK-shape change but more accurate.
config), the parent-account child-skip rule, and the
version-stripbehavior cover the new resource shape.
Test plan
make providermake build_sdksgo test ./...inprovider/pkgmake lint(provider + sdk + examples)