provider/aws: Treat ecs_service w/ Status==INACTIVE as deleted

- fixes https://github.com/hashicorp/terraform/issues/3582
This commit is contained in:
Radek Simko 2015-11-09 15:10:40 +01:00
parent deb17b90eb
commit 9683896480
1 changed files with 7 additions and 0 deletions

View File

@ -160,6 +160,13 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
}
service := out.Services[0]
// Status==INACTIVE means deleted service
if *service.Status == "INACTIVE" {
d.SetId("")
return nil
}
log.Printf("[DEBUG] Received ECS service %s", service)
d.SetId(*service.ServiceArn)