We have a Terraform+Ansible project, hosted on GitLab. Our Terraform Cloud has a workspace tracking the master branch on the repository, triggered only on changes to the terraform configuration directory. That works well.
However, we are currently testing changes to our infrastructure, which currently live on a feature branch. I’ve noticed that whenever I switch between the branches in workspace VCS settings, a plan is triggered even if there were no changes in the monitored directory (e.g. an unrelated merge). Even the Trigger line in the plan says Unable to detect changed files.
Could you please advise on how to prevent automatic Terraform runs triggered by VCS changes?
Currently, whenever I create a workspace and initiate a Terraform run using the API, it also triggers an additional run automatically. As a result, I end up with two runs, with one remaining in the queue. Based on the run message, it appears that the additional run is triggered due to VCS activity.
I would like to disable the auto-trigger caused by VCS changes and manage run execution exclusively through our backend. Could you please guide me on the recommended approach to achieve this?