我正在尝试使用Terraform和spot实例来设置一个ALB,用于一个非驱动的开发工作区。创建了spot实例,但是当试图在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
,它就能工作,所以它实际上只是一个生命周期问题。如何指示附件等待实例正常运行?
发布于 2017-09-27 20:31:17
您应该做的是为spot实例在自动标度组中创建spot实例,并将ASG附加到目标组。
https://stackoverflow.com/questions/46456557
复制相似问题