Given a `LogMetricFilter`, e.g. ```const yada = n...
# aws
m
Given a
LogMetricFilter
, e.g.
Copy code
const yada = new aws.cloudwatch.LogMetricFilter("yada", {
    pattern: "",
    logGroupName: dada.name,
    metricTransformation: {
        name: "EventCount",
        namespace: "YourNamespace",
        value: "1",
    },
});
How do I create a cloudwatch alarm with this? With regular metrics, I can use awsx an
.createAlarm()
but even falling back to the
aws
package for the
LogMetricFilter
it’s unclear to me. https://www.pulumi.com/docs/reference/pkg/aws/cloudwatch/metricalarm/
w
I think you would reference
yada.name
for the
metricName
property in the MetricAlarm resource.
b
yep, if you look at the
createAlarm()
component resource, this is what it seems to do: https://github.com/pulumi/pulumi-awsx/blob/333b1ff0d649e3f19187c2e8edc292dd6c131fbd/nodejs/awsx/cloudwatch/metric.ts#L262-L283
m
Great, thank you guys.
I actually needed
yada.metricTransformation.name