terraform: applyFn
This commit is contained in:
parent
b3e20a3e85
commit
9f5b6cc40f
|
@ -310,9 +310,18 @@ func testProviderFunc(n string, rs []string) ResourceProviderFactory {
|
||||||
applyFn := func(
|
applyFn := func(
|
||||||
s *ResourceState,
|
s *ResourceState,
|
||||||
d *ResourceDiff) (*ResourceState, error) {
|
d *ResourceDiff) (*ResourceState, error) {
|
||||||
return &ResourceState{
|
result := &ResourceState{
|
||||||
ID: "foo",
|
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(
|
diffFn := func(
|
||||||
|
|
Loading…
Reference in New Issue