great-sunset-355
01/13/2022, 9:39 AMTS2322: Type 'Output<string | undefined>' is not assignable to type 'Input<string>'
Because dimmensions
is defined as
/**
* The dimensions for this metric. For the list of available dimensions see the AWS documentation [here](<http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html>).
*/
dimensions?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
Therefore I cannot use like this:
new aws.cloudwatch.MetricAlarm(
this.rcName('CpuHigh'),
{
...
dimensions: {
ClusterName: this.cluster.clusterName!,
ServiceName: this.service.name
}
}
)
I noticed a similar issue here: https://github.com/pulumi/pulumi-aws/pull/414
Is there any workaround for that?brave-planet-10645
01/13/2022, 10:17 AM!
from the end of clusterName
?great-sunset-355
01/13/2022, 10:44 AMinterpolate
but it's not great IMOwhite-balloon-205
any
and it will work. But there is also an improvement at the TypeScript layer being pursued in https://github.com/pulumi/pulumi/pull/6323 which would make this work without any need for workarounds.