Skip to content

Commit b190aa0

Browse files
committed
core: Add missing OutputStates in synthetic state
In cases where we construct state directly rather than reading it via the usual methods, we need to ensure that the necessary maps are initialized correctly.
1 parent 828efef commit b190aa0

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎command/command_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ func testState() *terraform.State {
128128
},
129129
},
130130
},
131+
Outputs: map[string]*terraform.OutputState{},
131132
},
132133
},
133134
}

‎terraform/context_refresh_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ func TestContext2Refresh_outputPartial(t *testing.T) {
499499
},
500500
},
501501
},
502+
Outputs: map[string]*OutputState{},
502503
},
503504
},
504505
},

0 commit comments

Comments
 (0)