Integrate Encryption into State Backends (#1288)

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
Christian Mesh
2024-03-04 09:25:14 -05:00
committed by GitHub
parent ac3ed86617
commit 2f5dcd5c0a
95 changed files with 530 additions and 362 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/opentofu/opentofu/internal/command/arguments"
"github.com/opentofu/opentofu/internal/command/clistate"
"github.com/opentofu/opentofu/internal/command/views"
"github.com/opentofu/opentofu/internal/encryption"
"github.com/opentofu/opentofu/internal/states/statefile"
"github.com/opentofu/opentofu/internal/states/statemgr"
"github.com/opentofu/opentofu/internal/tfdiags"
@@ -68,7 +69,7 @@ func (c *StatePushCommand) Run(args []string) int {
}
// Read the state
srcStateFile, err := statefile.Read(r)
srcStateFile, err := statefile.Read(r, encryption.StateEncryptionTODO()) // Should we use encryption -> statefile config here?
if c, ok := r.(io.Closer); ok {
// Close the reader if possible right now since we're done with it.
c.Close()