Skip to content

Commit

Permalink
Fix for state_push: path for statefile is reqired for run state push cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
aav66 authored and kmoe committed Jun 24, 2022
1 parent 219508b commit 65b947d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tfexec/state_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@ func (tf *Terraform) statePushCmd(ctx context.Context, path string, opts ...Stat
args = append(args, "-lock-timeout="+c.lockTimeout)
}

args = append(args, path)

return tf.buildTerraformCmd(ctx, nil, args...), nil
}
2 changes: 2 additions & 0 deletions tfexec/state_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestStatePushCmd(t *testing.T) {
"push",
"-lock=false",
"-lock-timeout=0s",
"testpath",
}, nil, statePushCmd)
})

Expand All @@ -41,6 +42,7 @@ func TestStatePushCmd(t *testing.T) {
"-force",
"-lock=true",
"-lock-timeout=10s",
"testpath",
}, nil, statePushCmd)
})
}

0 comments on commit 65b947d

Please sign in to comment.