diff --git a/tfexec/state_push.go b/tfexec/state_push.go index 98f50f15..14e55a2e 100644 --- a/tfexec/state_push.go +++ b/tfexec/state_push.go @@ -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 } diff --git a/tfexec/state_push_test.go b/tfexec/state_push_test.go index 3c3250ed..075c33a2 100644 --- a/tfexec/state_push_test.go +++ b/tfexec/state_push_test.go @@ -26,6 +26,7 @@ func TestStatePushCmd(t *testing.T) { "push", "-lock=false", "-lock-timeout=0s", + "testpath", }, nil, statePushCmd) }) @@ -41,6 +42,7 @@ func TestStatePushCmd(t *testing.T) { "-force", "-lock=true", "-lock-timeout=10s", + "testpath", }, nil, statePushCmd) }) }