diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index 5ef7f626f9..c7811fe272 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -608,7 +608,7 @@ func (e *executor) apply( if err != nil { return nil, err } - statefilePath := filepath.Join(e.workdir, "terraform.tfstate") + statefilePath := getStateFilePath(e.workdir) stateContent, err := os.ReadFile(statefilePath) if err != nil { return nil, xerrors.Errorf("read statefile %q: %w", statefilePath, err)