Skip to content

Commit 5c64b17

Browse files
committed
configs: remove import block duplicate id check
1 parent 3732bff commit 5c64b17

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

internal/configs/module.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -431,18 +431,6 @@ func (m *Module) appendFile(file *File) hcl.Diagnostics {
431431
})
432432
continue
433433
}
434-
435-
if i.ID == mi.ID {
436-
if i.To.Resource.Resource.Type == mi.To.Resource.Resource.Type {
437-
diags = append(diags, &hcl.Diagnostic{
438-
Severity: hcl.DiagError,
439-
Summary: fmt.Sprintf("Duplicate import for ID %q", i.ID),
440-
Detail: fmt.Sprintf("An import block for the ID %q and a resource of type %q was already declared at %s. The same resource cannot be imported twice.", i.ID, i.To.Resource.Resource.Type, mi.DeclRange),
441-
Subject: &i.DeclRange,
442-
})
443-
continue
444-
}
445-
}
446434
}
447435

448436
if i.ProviderConfigRef != nil {

0 commit comments

Comments
 (0)