Hi I'm trying the example (<https://www.pulumi.com...
# aws
a
Hi I'm trying the example (https://www.pulumi.com/docs/aws/cloudwatch/) in this document for creating a cloudwatch alarm, how can I configure the instanceid and instance name in metricalarm. Thanks for the help.
Copy code
const metricAlarm = new aws.cloudwatch.MetricAlarm("mymetricalarm", {
    comparisonOperator: "GreaterThanOrEqualToThreshold",
    evaluationPeriods: 2,
    metricName: "CPUUtilization",
    namespace: "AWS/EC2",
    period: 120,
    statistic: "Average",
    unit:"Percent",        
    threshold: 0.5,
    alarmDescription: "This metric monitors ec2 cpu utilization"
});
l
The alarm's dimension configures this. There's more info here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/US_SingleMetricPerInstance.html
1
a
Thanks @little-cartoon-10569 it works
👍 1