https://pulumi.com logo
Title
t

tall-scientist-89115

03/22/2021, 4:35 AM
trying to use the
azure_native.cache.Redis
object and am getting this error:
azure-native:cache:Redis (redis):
    error: Code="InvalidRequestBody" Message="The value of the parameter 'properties.sku.family' is invalid.
When I try to add "family: C" to the
sku
property I get:
TSError: ⨯ Unable to compile TypeScript:
    redis/azure-cache.ts(23,7): error TS2322: Type '{ name: string; capacity: number; family: string; }' is not assignable to type 'Input<Sku>'.
I thought these type definitions were automatically generated to match the API? Any insight is appreciated.
t

tall-librarian-49374

03/22/2021, 7:07 AM
It’s a bug - fixed in the upcoming release. The issue and the workaround: https://github.com/pulumi/pulumi-azure-native/issues/641#issuecomment-792732486
t

tall-scientist-89115

03/22/2021, 2:03 PM
Thanks Mikhail!
Hey it seems like the typescript bindings for that version are missing azureNative.cache.v20200601.<inputs.SkuArgs>
glanced around the other versions and they also seem to be missing inputs. (they do have SkuFamily and SkuName at that level). Anywho I see your fix in the pipeline and we're not in prod quite yet so I appreciate you taking the time
t

tall-librarian-49374

03/22/2021, 2:54 PM
I believe the module path is different. Something like
azureNative.inputs.caache.v20200601.SkuArgs
You shouldn’t need to specify the type name most of the time, though.
Just use the resource from there:
new azureNative.cache.v20200601.Redis("", { sku: … });
t

tall-scientist-89115

03/22/2021, 4:40 PM
yep that worked! Just turning the args into a hash got it