Description
I am experiencing an issue with the terraform-aws-ecs-fargate-service module, specifically with the handling of alarm_actions in CloudWatch metric alarms. The module is calling another module (cn-terraform/ecs-service-autoscaling/aws) which is responsible for setting up auto-scaling.
Every time I execute terraform apply, I see the following changes in the plan, even though no actual changes are made to the infrastructure:
Issue
The alarm_actions attribute is supposed to include the ARN of the scaling policy and optionally an SNS topic ARN if it is provided. However, it ends up including null instead of an empty string, leading to unnecessary in-place updates in the Terraform plan.
Question
Why does the conditional expression for alarm_actions end with a null value instead of an empty string? How can this be resolved to avoid unnecessary updates?
Any help or guidance on this issue would be greatly appreciated.
Provider and Module Versions AWS Provider Version: ~> 5.0 Module Version: 2.0.43
Description I am experiencing an issue with the terraform-aws-ecs-fargate-service module, specifically with the handling of alarm_actions in CloudWatch metric alarms. The module is calling another module (cn-terraform/ecs-service-autoscaling/aws) which is responsible for setting up auto-scaling.
Every time I execute terraform apply, I see the following changes in the plan, even though no actual changes are made to the infrastructure:
Module Call Here is how the ecs-autoscaling module is being called:
Problematic Section in the ecs-autoscaling Module
The issue seems to be originating from the following part of the ecs-autoscaling module:
Issue The alarm_actions attribute is supposed to include the ARN of the scaling policy and optionally an SNS topic ARN if it is provided. However, it ends up including null instead of an empty string, leading to unnecessary in-place updates in the Terraform plan.
Question Why does the conditional expression for alarm_actions end with a null value instead of an empty string? How can this be resolved to avoid unnecessary updates?
Any help or guidance on this issue would be greatly appreciated.