diff --git a/builtin/providers/aws/resource_aws_directory_service_directory.go b/builtin/providers/aws/resource_aws_directory_service_directory.go index 4f241f48a29c..711617a60e1f 100644 --- a/builtin/providers/aws/resource_aws_directory_service_directory.go +++ b/builtin/providers/aws/resource_aws_directory_service_directory.go @@ -401,6 +401,13 @@ func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta inter out, err := dsconn.DescribeDirectories(&input) if err != nil { return err + + } + + if len(out.DirectoryDescriptions) == 0 { + log.Printf("[WARN] Directory %s not found", d.Id()) + d.SetId("") + return nil } dir := out.DirectoryDescriptions[0]