我正在使用 terraform 版本 Terraform v0.11.13。我正在为 AWS 云使用 terraform,我有一些模板文件存储了我的应用程序的环境变量。我正在使用 AWS ECS 并创建了 ECS 任务定义和 ECS 服务,并将任务定义环境变量列表引用到模板文件(.tpl 文件)。
现在,即使我没有更改模板文件中的任何内容,Terraform 也会显示每次都销毁和重新创建 ECS 任务定义和 ECS 服务。
示例场景:
~ 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>
即使没有改变,为什么它试图从某个版本计划到计算 ??????
.tpl 文件中的缩进是否可能是此版本或 terraform 版本的问题,可能是什么问题以及此问题的可能解决方案是什么。
请帮忙。
提前致谢 :)