mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
helper/schema: pass through import state func
This commit is contained in:
parent
b9d0e14d2a
commit
b7d4767dd6
@ -43,3 +43,10 @@ type StateFunc func(*ResourceData, interface{}) ([]*ResourceData, error)
|
||||
func (r *ResourceImporter) InternalValidate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ImportStatePassthrough is an implementation of StateFunc that can be
|
||||
// used to simply pass the ID directly through. This should be used only
|
||||
// in the case that an ID-only refresh is possible.
|
||||
func ImportStatePassthrough(d *ResourceData, m interface{}) ([]*ResourceData, error) {
|
||||
return []*ResourceData{d}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user