dotnetwhen
# general
g
dotnetwhen
b
dotnetsoon ๐Ÿ˜ @bitter-oil-46081 is hard at work on this, and it is tracked at https://github.com/pulumi/pulumi/issues/1526, and in fact, the #contribute channel has been talking about this. Please feel free to join in to help us do it right!
g
Wow, that's a very fast reply...
Have you considered leveraging F# type providers for the API?
Strongly typed pulumi would be incredible...
and with a generative type provider, you could utilize the types from C# as well.
a
You should chat with @tall-librarian-49374 โ€” heโ€™s a big fan of F#
t
Not sure what type provider could do there... But yes, F# API could look awesome. I'm thinking more of leveraging custom CEs.
w
The cloud platform APIs being projected here are statically described, and we have existing tools to generate API definitions for JavaScript, Python, Go, etc. - so a similar approach will likely make sense for .NET, without the need for F# Type Providers. (I say that as someone who helped design the initial Type Providers feature for F# back when I worked on the F# team at Microsoft :-)).
t
Yes, that was my point too (OMG, F# designers here)
g
Oh, the idea would be to make the following style of the API actually type safe: https://pulumi.io/quickstart/aws-ec2.html
That could be done with code gen too, I suppose. Just want to get rid of those scary strings.
t
This could (and should?) be done in TS too
g
(Definitely)
I think for a more concrete example for where the type provider would be useful is this part of the API: https://pulumi.io/reference/pkg/nodejs/@pulumi/aws/ec2/#getInstance Being able to go, say,
Copy code
let ip = Pulumi.Aws.Ec2.MyServerName.PublicIP

doStuffWithMyIp(ip)
Would be pretty amazing...
t
But before you start, there is no MyServerName yet. Most pulumi code should be "desired state configuration", not navigating through your current infra in AWS account.