Skip to content

Commit

Permalink
configs: remove import block duplicate id check
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jun 27, 2023
1 parent 3732bff commit 5c64b17
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions internal/configs/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,18 +431,6 @@ func (m *Module) appendFile(file *File) hcl.Diagnostics {
})
continue
}

if i.ID == mi.ID {
if i.To.Resource.Resource.Type == mi.To.Resource.Resource.Type {
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: fmt.Sprintf("Duplicate import for ID %q", i.ID),
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),
Subject: &i.DeclRange,
})
continue
}
}
}

if i.ProviderConfigRef != nil {
Expand Down

0 comments on commit 5c64b17

Please sign in to comment.