mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Initial wiring of encryption through the command package (#1316)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
@@ -78,8 +78,16 @@ func (c *StateReplaceProviderCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// Load the encryption configuration
|
||||
enc, encDiags := c.Encryption()
|
||||
diags = diags.Append(encDiags)
|
||||
if encDiags.HasErrors() {
|
||||
c.showDiagnostics(diags)
|
||||
return 1
|
||||
}
|
||||
|
||||
// Initialize the state manager as configured
|
||||
stateMgr, err := c.State()
|
||||
stateMgr, err := c.State(enc)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(errStateLoadingState, err))
|
||||
return 1
|
||||
@@ -167,7 +175,7 @@ func (c *StateReplaceProviderCommand) Run(args []string) int {
|
||||
resource.ProviderConfig.Provider = to
|
||||
}
|
||||
|
||||
b, backendDiags := c.Backend(nil)
|
||||
b, backendDiags := c.Backend(nil, enc.Backend())
|
||||
diags = diags.Append(backendDiags)
|
||||
if backendDiags.HasErrors() {
|
||||
c.showDiagnostics(diags)
|
||||
|
||||
Reference in New Issue
Block a user