Integrate with VCS¶
Terraform Cloud offers a VCS-driven workflow that automatically triggers runs based on changes to your VCS repositories.
The CLI-driven workflow allows you to quickly iterate on your configuration and work locally, while the VCS-driven workflow enables collaboration within teams by establishing your shared repositories as the source of truth for infrastructure configuration.
GitHub¶
You need a GitHub repository to store code and be access from Terraform cloud.
Terraform cloud¶
In your Terraform cloud workspace go to settings
then version control
and select GitHub
then the target GitHib platform (here I'm using github.com). Select the option to Authorize Terraform Cloud
and then select where you want to install Terraform Cloud. You can leave all the options as default or choose to change them as desired. Make sure you save by clicking Update VCS settings
.