我正在尝试使用Terraform和spot实例为非prod开发工作区设置ALB。现场实例已创建,但在尝试使用aws_alb_arget_group_attachment
中的实例时,收到错误:
* aws_alb_target_group_attachment.ui_servers: Error registering targets with target group: InvalidTarget: The following targets are not in a running state and cannot be registered: '[id]'
status code: 400, request id: [id]
即使我向附件添加depends_on
指令,这仍然存在:
depends_on = ["data.aws_instance.workspace_gz"]
如果我重新运行terraform apply
,它会起作用,所以它只是一个生命周期问题。如何指示附件等到实例健康?