mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Refactor encryption configuration (#1387)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func (c *StateMeta) State(enc encryption.Encryption) (statemgr.Full, error) {
|
||||
realState = statemgr.NewFilesystem(c.statePath, encryption.StateEncryptionDisabled()) // User specified state file should not be encrypted
|
||||
} else {
|
||||
// Load the backend
|
||||
b, backendDiags := c.Backend(nil, enc.Backend())
|
||||
b, backendDiags := c.Backend(nil, enc.State())
|
||||
if backendDiags.HasErrors() {
|
||||
return nil, backendDiags.Err()
|
||||
}
|
||||
@@ -62,7 +62,7 @@ func (c *StateMeta) State(enc encryption.Encryption) (statemgr.Full, error) {
|
||||
}
|
||||
|
||||
// Get a local backend
|
||||
localRaw, backendDiags := c.Backend(&BackendOpts{ForceLocal: true}, enc.Backend())
|
||||
localRaw, backendDiags := c.Backend(&BackendOpts{ForceLocal: true}, enc.State())
|
||||
if backendDiags.HasErrors() {
|
||||
// This should never fail
|
||||
panic(backendDiags.Err())
|
||||
|
||||
Reference in New Issue
Block a user