Merge pull request #3828 from TimeIncOSS/b-aws-ecs-service-del
provider/aws: Treat ecs_service w/ Status==INACTIVE as deleted
This commit is contained in:
commit
15a568c806
|
@ -160,6 +160,14 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
|
|||
}
|
||||
|
||||
service := out.Services[0]
|
||||
|
||||
// Status==INACTIVE means deleted service
|
||||
if *service.Status == "INACTIVE" {
|
||||
log.Printf("[DEBUG] Removing ECS service %q because it's INACTIVE", service.ServiceArn)
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Received ECS service %s", service)
|
||||
|
||||
d.SetId(*service.ServiceArn)
|
||||
|
|
Loading…
Reference in New Issue