pulumi / pulumi-dotnet

.NET support for Pulumi
Apache License 2.0
28 stars 25 forks source link

[sdk] Lazily initialize alias combinations during `RegisterResourceRequest` preparation #97

Closed Zaid-Ajaj closed 1 year ago

Zaid-Ajaj commented 1 year ago

90 brought back AllAliases which is the fallback logic for older Pulumi engines where supports("aliasSpecs") == false still called it in the constructor of Resource. This PR makes it such that we only call AllAliases when preparing the RegisterResourceRequest and have actually checked that supports("aliasSpecs") == false holds.

Also brings back unit tests for AllAliases using mocks to make sure the old implementation did what it was supposed to do.