provider/aws: If ecs_service isn't found during Read, delete it

This commit is contained in:
Radek Simko 2015-11-13 21:44:17 +00:00
parent d9a5de7f7d
commit 0822776de0
1 changed files with 2 additions and 0 deletions

View File

@ -156,6 +156,8 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
} }
if len(out.Services) < 1 { if len(out.Services) < 1 {
log.Printf("[DEBUG] Removing ECS service %q because it's gone", service.ServiceArn)
d.SetId("")
return nil return nil
} }