Defning cloudwatch metric alarm which uses metric math using ansible ec2_metric_alarm

I’m using ansible’s ec2_metric_alarm for creating CloudWatch metrics alarms.

now, I have some metrics defined which uses metric math, I’m trying to define alarms for those using ec2_metric_alarm but I cannot find a way.

This stack overflow question solves the same problem but using CloudFormation template. Let me know if there is a way to do above using ansible’s ec2_metric_alarm.

Thanks

Maybe try using terraform ?

I find the terraform module for aws is usually more update than ansible’s aws module

Regards
Tony