bitter-dentist-28132
02/05/2020, 6:37 PMexport const getSigningKey = (
secretKey: string | pulumi.Output<string>,
region: pulumi.Output<digitalocean.Region | aws.Region>
) => {...};
if (cloud === 'digitalocean') {
s3 = new digitalocean.SpacesBucket(env, {
region: awsRegion,
});
} else if (cloud === 'aws') {
s3 = new aws.s3.Bucket(env, {
region: awsRegion,
});
}
signingKey = getSigningKey(
awsSecretKey,
s3!.region
);
this doesn't work. it complains that the types for region
don't match. anyone know why?tall-librarian-49374
02/05/2020, 7:48 PMgreen-school-95910
02/05/2020, 9:32 PMexport const getSigningKey = (
secretKey: string | pulumi.Output<string>,
region: pulumi.Output<digitalocean.Region> | pulumi.Output<aws.Region>
) => {...};
pulumi.Input
as it includes passing the internal type directly or with a promise. Then in your function you can use pulumi.output(region)
bitter-dentist-28132
02/10/2020, 5:40 PM