Run pipeline with predefined variables which also picks up changes to files from last commit

I know it is possible to trigger jobs when changes to files occur on a git push event
So for example. I make changes on a feature branch to a terraform file, this rule will trigger the job

    - .terraform
  stage: plan
     - if: $CI_COMMIT_BRANCH =~ /^feature\/.*$/
         - "**/*.{tf}"  
       when: manual
       allow_failure: true

But the problem I have, is I need to run the pipeline with predefined variables, so I need to run the pipeline “again” after I have pushed the changes. So when I run the pipeline again with predefined variable, all jobs will run because it does not recognises the changes from the last git push, is there any way I can reference the last commit when running the pipeline with predefined variable from the console so it will only trigger the jobs were files have changed?

Hi @funkles

This behavior is described in a warning box in official docs.

If you need to run only a single job on a manual pipeline I suggest to define a set of rules either by disabling all jobs except terraform:plan: in manual pipelines or by using some other variable you specify when running the pipeline manually from console.