https://pulumi.com logo
#general
Title
# general
b

busy-island-31180

07/15/2022, 6:11 PM
is it possible to write a component in a component provider that accepts inputs/outputs of raw strings (and other primitives), in addition to promises/(input type)?
coming from golang, I see several types of things in providers, some take "resource options" and others take "invoke options"
invokable api functions act immediately, and return primitive values
resource api functions act like promises
I understand both, and both make perfect sense
I'm just looking for an ability to have a resource return both promises and primitive values
the primitives would would be restricted to things known at compile/run-time (applies at both preview & up operations)
b

bored-oyster-3147

07/15/2022, 9:08 PM
What use case are you trying to meet?
h

happy-parrot-60128

07/16/2022, 7:44 AM
Yup, these are called "plain" inputs in the schema
b

busy-island-31180

07/20/2022, 12:12 AM
@happy-parrot-60128 answered the question, it was the “plain” field in the schema. Thanks!
🎉 1
the schema never explicitly references pulumi’s “promise” types (input/output), yet when declaring
string
as a result, it implicitly means “StringOutput” (as an example). I was looking for how do I provide a “plain” string. 🙂 just writing it all out here incase someone else comes across this thread
2 Views