Migrate Environment to infer - #836
Draft
iwahbe wants to merge 1 commit into
Draft
Conversation
Contributor
Does the PR have any schema changes?Looking good! No breaking changes found. Maintainer note: consult the runbook for dealing with any breaking changes. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #836 +/- ##
==========================================
- Coverage 52.18% 51.75% -0.44%
==========================================
Files 82 82
Lines 9598 9481 -117
==========================================
- Hits 5009 4907 -102
- Misses 4117 4118 +1
+ Partials 472 456 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Metabase shows we don't need an |
Replaces the manual `PulumiServiceEnvironmentResource` implementation with an infer-based resource. The Environment resource is unusual in that it talks to two backends — the Pulumi Cloud API (for the metadata UUID) and the upstream Pulumi ESC HTTP client (for the YAML body); it reaches the latter via `config.GetEscClient`, which the provider already vends alongside the Pulumi Cloud client. Regenerates the embedded provider schema. The wire-level shape is unchanged apart from the addition of `replaceOnChanges` annotations on the identifier inputs, which the legacy resource enforced inside its custom `Diff` rather than declaring in the schema.
iwahbe
force-pushed
the
iwahbe/migrate-environment
branch
from
June 9, 2026 15:45
481df20 to
797210b
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
Environmentresource to theinferframework. The legacyPulumiServiceEnvironmentResource(manual gRPC) is removed in favour of aninfer.Resource-shapedEnvironmentwithEnvironmentInput/EnvironmentStatestructs.config.GetEscClient, which the provider already vends alongsideconfig.GetClient.pulumiservice:index:Environmentblock frommanual-schema.json. Infer regenerates the schema with the same wire shape; the only diff is the addition ofreplaceOnChanges: trueannotations onorganization,project, andname, which were previously enforced in the legacy resource's customDiff.Test plan
make providermake build_sdksgo test -short ./...inprovider/pkgmake lintNotes
yamlis typed astypes.AssetOrArchiveto preserve the published schema (pulumi.json#/Asset).EnvironmentStatedeliberately does not embedEnvironmentInput: keepingprojectrequired in state (with a default) matches the legacy SDK's non-nullableProjectoutput even thoughprojectis optional on input.