File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ import (
1414 "github.com/hashicorp/terraform/internal/plans"
1515)
1616
17- var _ ConfigState [BackendConfigState ] = & BackendConfigState {}
17+ var _ ConfigState = & BackendConfigState {}
18+ var _ DeepCopier [BackendConfigState ] = & BackendConfigState {}
1819var _ Planner [plans.Backend ] = & BackendConfigState {}
1920
2021// BackendConfigState describes the physical storage format for the backend state
Original file line number Diff line number Diff line change @@ -9,13 +9,20 @@ import (
99)
1010
1111// ConfigState describes a configuration block, and is used to make that config block stateful.
12- type ConfigState [ T any ] interface {
12+ type ConfigState interface {
1313 Empty () bool
1414 Config (* configschema.Block ) (cty.Value , error )
1515 SetConfig (cty.Value , * configschema.Block ) error
16+ }
17+
18+ // DeepCopier implementations can return deep copies of themselves for use elsewhere
19+ // without mutating the original value.
20+ type DeepCopier [T any ] interface {
1621 DeepCopy () * T
1722}
1823
24+ // Planner implementations can return a representation of their data that's
25+ // appropriate for storing in a plan file.
1926type Planner [T any ] interface {
2027 Plan (* configschema.Block , string ) (* T , error )
2128}
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ import (
1515 ctyjson "github.com/zclconf/go-cty/cty/json"
1616)
1717
18- var _ ConfigState [StateStoreConfigState ] = & StateStoreConfigState {}
18+ var _ ConfigState = & StateStoreConfigState {}
19+ var _ DeepCopier [StateStoreConfigState ] = & StateStoreConfigState {}
1920var _ Planner [plans.StateStore ] = & StateStoreConfigState {}
2021
2122// StateStoreConfigState describes the physical storage format for the state store
You can’t perform that action at this time.
0 commit comments