Someone who's more familiar with pulumi's typscrip...
# typescript
Someone who's more familiar with pulumi's typscript judo know of a way to work around the
Input<Region> | undefined
limitation when I try to dynamically create
? I'm trying to do the following to get around another issue with default providers and using
Copy code
import { getConfig } from "@pulumi/pulumi/runtime/config";

    const defaultProvider = new aws.Provider(`${stack}-peer-provider`, {
        region: getConfig("aws:region"),
        profile: "org_prod"
You get:
Copy code
error TS2322: Type 'string | undefined' is not assignable to type 'Input<Region> | undefined'.
      Type 'string' is not assignable to type 'Input<Region> | undefined'
So I would need to fudge that enum constant somehow but am kind of lost on how I would do that considering its expecting it to be an Input<>
You can fix this with a type assertion. Put "as Region" after your region value (import Region from the pulumi aws package)
It works! Thx a bunch!
My typescript is still mediocre at best
You'll get better. It just takes time :)