pulumi / pulumi-terraform-bridge

A library allowing Terraform providers to be bridged into Pulumi.
Apache License 2.0
199 stars 43 forks source link

Refactor providerbuilder Resource to apply defaults in NewResource #2630

Closed VenelinMartinov closed 3 days ago

VenelinMartinov commented 4 days ago

This PR is a refactor of the test utilities in PF for creating Resources.

We now have a NewResource function to create pb.Resource which fills in reasonable defaults which were previously handled in NewProvider. This in turn will allow us to use pb.Resource as an argument in Diff cross-tests.

The concrete use case I am after with this is for Diff cross-tests for Computed properties, which require a custom Create and Update function.

VenelinMartinov commented 4 days ago

This change is part of the following stack:

Change managed by git-spice.

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.93%. Comparing base (a3ccb9f) to head (875ca0b). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2630 +/- ## ========================================== - Coverage 69.94% 69.93% -0.01% ========================================== Files 367 367 Lines 44522 44523 +1 ========================================== - Hits 31140 31138 -2 - Misses 11751 11753 +2 - Partials 1631 1632 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

pulumi-bot commented 11 hours ago

This PR has been shipped in release v3.96.0.