Skip to content

Commit f14cd29

Browse files
committed
Fix - it is valid to not have a backend config in the plan file
1 parent b99ab41 commit f14cd29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/command/meta_backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ func (m *Meta) Operation(b backend.Backend, vt arguments.ViewType) *backendrun.O
426426
var planOutStateStore *plans.StateStore
427427
switch {
428428
case m.backendConfigState == nil && m.stateStoreConfigState == nil:
429-
// Neither set
430-
panic(fmt.Sprintf("failed to encode backend configuration for plan: neither backend nor state_store data present"))
429+
// It is valid for neither to be set.
430+
// So we do nothing here.
431431
case m.backendConfigState != nil && m.stateStoreConfigState != nil:
432432
// Both set
433433
panic(fmt.Sprintf("failed to encode backend configuration for plan: both backend and state_store data present but they are mutually exclusive"))

0 commit comments

Comments
 (0)