Open EronWright opened 3 days ago
Looking good! No breaking changes found. No new resources/functions.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 36.56%. Comparing base (
deae4dc
) to head (40eee79
). Report is 1 commits behind head on master.:exclamation: Current head 40eee79 differs from pull request most recent head 1195967
Please upload reports for the commit 1195967 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Proposed changes
This PR seeks to make the
apiVersion
andkind
properties be plain (prompt) values when configuring aCustomResource
. A plain value is required to eagerly compute the resource type token, e.g.kubernetes:stable.example.com/v1:CronTab
orkubernetes:stable.example.com/v1:CronTabPatch
.Three APIs are considered here:
get
helpersA summary of changes:
apiVersion
andkind
properties to beplain: true
.internals.UnsafeAwaitOutput
to synchronously resolve the value.Examples
Here's some examples based on existing program code; the requirement is that the program code needn't be changed.
Go SDK
Observe that the value of
ApiVersion
is of typepulumi.String
which is an Input-compatible alias forstring
but is not implicitly convertible tostring
. For this reason, the API was left unchanged and the user would see an error at runtime if the value weren't a prompt value.One of the Go SDK tests actually does use an output as a value, and that's still possible here but not in the other SDKs.
.NET SDK
The program code creates a subclass of
CustomResourceArgs
, supplying theapiVersion
andkind
asstring
-type constructor arguments.Closes #1115
Related issues (optional)