gorgeous-translator-67757
05/03/2021, 5:15 PMgentle-diamond-70147
05/03/2021, 6:02 PMgetX
functions that can help with this - e.g. https://www.pulumi.com/docs/reference/pkg/aws/ec2/getinstances/.gorgeous-translator-67757
05/03/2021, 6:41 PMtest_instances = [i-xyz i-abc]
gentle-diamond-70147
05/03/2021, 7:52 PMtest_instances = ["i-xyz", "i-abc"]
for instance_id in test_instances:
instance_alarm = aws.cloudwatch.MetricAlarm(f"alarm-{instance_id}",
alarm_description=f"Monitor for instance {instance_id}",
# other inputs
)
gorgeous-translator-67757
05/03/2021, 7:58 PM