I am using terraform version Terraform v0.11.13. I am using terraform for AWS cloud, I have some template files which stores environment variables of my application. I am using AWS ECS and created a ECS Task definition and ECS service and referenced task defination environment variables list to an template file (.tpl files).
Now even If I didnt change anything in my template file , Terraform is showing to destroy and recreate ECS task defination and ECS service everytime.
sample scenario:
~ aws_ecs_service.test_app_sidekiq_api
task_definition: "arn:aws:ecs:ap-southeast-1:xxxxxxxxxxxx:task-definition/test-app-sidekiq-api:84" => "${ aws_ecs_task_definition.test_app_sidekiq_api.arn }"
-/+ aws_ecs_task_definition.test_app_sidekiq_api (new resource required)
id: "test-app-sidekiq-api" => <computed> (forces new resource)
arn: "arn:aws:ecs:ap-southeast-1:xxxxxxxxxxxx:task-definition/test-app-sidekiq-api:84" => <computed>
even when there is no change why its trying to plan from some version to computed ??????
can the indentation in .tpl files can be a problem for this or terraform version, what may be the problem and what could be the probable solution for this issue.
Please help.
Thanks in Advance :)