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:
Radek Simko 2015-11-12 00:01:50 +00:00
commit 15a568c806
1 changed files with 8 additions and 0 deletions

View File

@ -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)