Terraform Cloud - Runs are not being triggered automatically by Github

Hi,

I’m still new to using Terraform Cloud, setting it up for a CI/CD. I’m running into the following issue: I created a workspace and configured it’s VCS to point to a branch on my Github personal repo (outside of any organisation). When pushing new commits to this branch, the runs aren’t getting triggered automatically by Github. When I ran them manually from the UI, the run still points at the master branch and at a past commit.
Please see screenshots:

Previous commit on master only being picked up:

Workspace setup to get triggered on changes on the updates branch:

Can you please tell me if you can spot something wrong? Do I need Terraform Cloud Enterprise for that?

Best,
Kevin

Hi Kevin!

The setup looks correct to me from the workspace perspective, could you confirm if Github reflects commits to the updates branch?

There may be a few other places to check:

  • Reset the VCS Provider settings in Terraform Cloud (https://app.terraform.io/app/<org>/settings/version-control) to reconnect to your personal GitHub.

  • Check Github Applications, Terraform Cloud application should have the following permissions:

I believe there was some degradation with webhooks in the past few days that might have affected the retrieval of commits.

Let us know if it continues to be a problem.

Hello!

Thanks for your answer, removing and resetting the VCS connection helped to replay commits that were ignored. However, when pushing new commits to the branch, no run is added, it’s blocked.

Also, I checked Github Apps, I think it looks good but different than the above screenshot:

Does it look good to you too?

Thanks,
Kevin

Interesting! I wonder if the permissions aren’t quite right. Let me see if I can find someone who can check into this but in the meantime, can you confirm if you set up your VCS provider with Configuration-Free Github settings or Github.com Access (OAuth)?

If you tried Configuration-Free Github, give OAuth a try and let us know.

Hi,

I have a similar problem to this case.
I have had 2 workspaces connected to a github repository. One for develop branch and the other for master branch. Both workspaces have the same settings except VCS branch. However, the remote execution is only working on the workspace for develop branch. Nothing happens on the one for master branch. The difference between 2 is below.

develop branch:

  • commits are merged from pull request.
  • right after vcs setting was done, a manual plan(only plan, not apply) was run once on terraform cloud.

master branch:

  • commits are directly pushed from local branch.

Version Control page
Image from Gyazo
General Setting page
Image from Gyazo

run status
Image from Gyazo

Do you need to queue plan manually after workspaces are created in order to use remote execution via VCS? or else can you think of what could be my problem here?

Thank you,
Musashi