Optimize AWS provider startup metadata checks#6365
Merged
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6365 +/- ##
=======================================
Coverage 15.98% 15.98%
=======================================
Files 374 374
Lines 91298 91298
=======================================
Hits 14596 14596
Misses 76682 76682
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
corymhall
force-pushed
the
aws-pf-schema-metadata-startup
branch
2 times, most recently
from
June 5, 2026 14:21
6d82de5 to
02801be
Compare
corymhall
marked this pull request as ready for review
June 5, 2026 16:39
Contributor
There was a problem hiding this comment.
No actionable issues found.
Reviewed by Internal Trusted PR Reviewer
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add pulumi-labs/gh-aw-internal/.github/workflows/gh-aw-pr-review.md@8a92f53fac170563f7727cacab2dbedb5d5b9e29
pose
approved these changes
Jun 15, 2026
corymhall
force-pushed
the
aws-pf-schema-metadata-startup
branch
from
June 16, 2026 11:14
02801be to
b8f39a6
Compare
Contributor
|
This PR has been shipped in release v7.34.0. |
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
This PR moves a few AWS-specific provider startup decisions out of live Terraform schema inspection and into generated metadata.
The provider currently needs resource-level facts for:
nameautonamingtags/tags_allpre-check handlingFor AWS, asking live schemas for those facts during runtime provider construction can trigger expensive SDKv2
SchemaFuncpaths and large allocations. This PR addsaws-resource-metadata.json, generated during tfgen, and uses that embedded metadata at runtime instead.Details
hasInputName,hasUsableRegion, andhasTagsAndTagsAll.ProviderFromMetato use embedded metadata for runtime callback/autonaming decisions.resources.go; Plugin Framework resources continue to rely on upstream behavior.Refs #6357
Notes
aws-resource-metadata.jsonintentionally omits resources where all generated facts are false. At runtime, a missing key means zero-value metadata. Provider upgrades should refresh this file through schema generation; the parity tests are intended to catch stale metadata.Testing
cd provider && go test -v -short .cd provider && go test -v -short -run 'Test(HasNonComputedTagsAndTagsAllOptimized|HasOptionalOrRequiredNamePropertyOptimized|HasUsableRegionMetadata|RegionPreCheckCallbackInstalledFromMetadata|TagsPreCheckCallbackAppliesOnlyToSDKV2Resources|SetAutonamingAddsGenericNameWithoutOverwritingFields|CustomAutoNameTransforms)$' .bin/pulumi-tfgen-aws schema --out /private/tmp/pulumi-aws-schema-metadata --skip-docs --skip-examplesgofmt -l provider/resources.go provider/resources_test.go provider/region.go provider/tags.go provider/cmd/pulumi-tfgen-aws/main.gogit diff --check