https://pulumi.com logo
Title
h

happy-pencil-64085

10/13/2020, 8:09 PM
Is there a best practice for calling the AWS SDK from my pulumi program? Currently writing in C# and most of my infrastructure is defined in the constructors for my different stacks. Essentially, I need to create a table in Athena and there is no way to do it through the current Pulumi (terraform) API
I could set the resources to have static names, but I'd rather use the dynamic ones so I don't run into collision issues
l

little-cartoon-10569

10/13/2020, 8:10 PM
Assuming your SDK code is dependent on Pulumi code, you'll need to run it in an
Output.apply()
that's dependent on the resource that Pulumi creates. Or, you could use automation-api, that might make the structure a little easier to read.
w

worried-city-86458

10/13/2020, 8:16 PM
Automation api is not available for dotnet/c#... yet
A dynamic provider might be the way to go, but those are also currently not supported for dotnet/c#
l

little-cartoon-10569

10/13/2020, 8:18 PM
Yep, so the apply route might be best. But if you wanted to write a small nodejs or golang wrapper around your C# pulumi code... actually, might as well write two C# apps at the point, and call both from a script...
Not elegant, but certainly easy..
h

happy-pencil-64085

10/13/2020, 10:32 PM
gotcha thanks!