AWS step scaling policy

I am looking for a way to set up step scaling policy for an ECS service trigerred by a cloud watch alarm. I am able to add a policy to a service with Terraform, but can’t find any parameter that would correspond to “Execute policy when: alarm name” field in AWS console. Is there a way to use this functionality with Terraform?

Answering to myself. That is being set up by adding policy arn to cloudwatch alarm action.