terraform: applyFn
This commit is contained in:
parent
b3e20a3e85
commit
9f5b6cc40f
|
@ -310,9 +310,18 @@ func testProviderFunc(n string, rs []string) ResourceProviderFactory {
|
|||
applyFn := func(
|
||||
s *ResourceState,
|
||||
d *ResourceDiff) (*ResourceState, error) {
|
||||
return &ResourceState{
|
||||
result := &ResourceState{
|
||||
ID: "foo",
|
||||
}, nil
|
||||
Attributes: make(map[string]string),
|
||||
}
|
||||
|
||||
if d != nil {
|
||||
for ak, ad := range d.Attributes {
|
||||
result.Attributes[ak] = ad.New
|
||||
}
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
diffFn := func(
|
||||
|
|
Loading…
Reference in New Issue