Terraform Cloud - changing VCS branch triggers plan


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.

Is this expected, or a bug?

Thank you,

Hello Marko,

This is the expected behaviour.

When you update the VCS settings for a workspace, Terraform Cloud will ingress the latest commit from the tracked branch and trigger a run with it.


Thank you very much! Just needed to adjust my workflow a bit.