remove a few traces of states.EachMode
This commit is contained in:
parent
98cf28b02d
commit
15a95031e5
|
@ -259,6 +259,7 @@ func marshalResources(resources map[string]*states.Resource, module addrs.Module
|
|||
|
||||
current := resource{
|
||||
Address: r.Addr.Instance(k).String(),
|
||||
Index: k,
|
||||
Type: resAddr.Type,
|
||||
Name: resAddr.Name,
|
||||
ProviderName: r.ProviderConfig.Provider.String(),
|
||||
|
@ -276,10 +277,6 @@ func marshalResources(resources map[string]*states.Resource, module addrs.Module
|
|||
)
|
||||
}
|
||||
|
||||
if r.EachMode != states.NoEach {
|
||||
current.Index = k
|
||||
}
|
||||
|
||||
schema, _ := schemas.ResourceTypeConfig(
|
||||
r.ProviderConfig.Provider,
|
||||
resAddr.Mode,
|
||||
|
|
|
@ -193,7 +193,6 @@ func TestMarshalResources(t *testing.T) {
|
|||
Name: "bar",
|
||||
},
|
||||
},
|
||||
EachMode: states.NoEach,
|
||||
Instances: map[addrs.InstanceKey]*states.ResourceInstance{
|
||||
addrs.NoKey: {
|
||||
Current: &states.ResourceInstanceObjectSrc{
|
||||
|
@ -237,7 +236,6 @@ func TestMarshalResources(t *testing.T) {
|
|||
Name: "bar",
|
||||
},
|
||||
},
|
||||
EachMode: states.EachList,
|
||||
Instances: map[addrs.InstanceKey]*states.ResourceInstance{
|
||||
addrs.IntKey(0): {
|
||||
Current: &states.ResourceInstanceObjectSrc{
|
||||
|
@ -281,7 +279,6 @@ func TestMarshalResources(t *testing.T) {
|
|||
Name: "bar",
|
||||
},
|
||||
},
|
||||
EachMode: states.EachMap,
|
||||
Instances: map[addrs.InstanceKey]*states.ResourceInstance{
|
||||
addrs.StringKey("rockhopper"): {
|
||||
Current: &states.ResourceInstanceObjectSrc{
|
||||
|
@ -325,7 +322,6 @@ func TestMarshalResources(t *testing.T) {
|
|||
Name: "bar",
|
||||
},
|
||||
},
|
||||
EachMode: states.NoEach,
|
||||
Instances: map[addrs.InstanceKey]*states.ResourceInstance{
|
||||
addrs.NoKey: {
|
||||
Deposed: map[states.DeposedKey]*states.ResourceInstanceObjectSrc{
|
||||
|
@ -371,7 +367,6 @@ func TestMarshalResources(t *testing.T) {
|
|||
Name: "bar",
|
||||
},
|
||||
},
|
||||
EachMode: states.NoEach,
|
||||
Instances: map[addrs.InstanceKey]*states.ResourceInstance{
|
||||
addrs.NoKey: {
|
||||
Deposed: map[states.DeposedKey]*states.ResourceInstanceObjectSrc{
|
||||
|
|
|
@ -154,6 +154,6 @@ func TestFullInitialState() *states.State {
|
|||
Provider: addrs.NewLegacyProvider(rAddr.ImpliedProvider()),
|
||||
Module: addrs.RootModule,
|
||||
}
|
||||
childMod.SetResourceMeta(rAddr, states.EachList, providerAddr)
|
||||
childMod.SetResourceProvider(rAddr, providerAddr)
|
||||
return state
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue