Well-Architected Framework
Use version control
Version control systems add predictability and visibility to your infrastructure management process by creating a single source of truth for your infrastructure configuration. Storing your configuration in version control also allows you to revert infrastructure to previous commits, tags, or releases.
Version control also helps facilitate collaboration between team members by allowing them to test out specific code versions locally or remotely. They will also be able to conduct code reviews by leaving comments or suggestions for the version they are testing.
HCP Terraform streamlines your development process by integrating directly with your version control system and CI/CD pipelines. These integrations provide previews of your infrastructure changes before you apply them. This lets your team review and approve changes before you apply them.
HashiCorp provides GitHub Actions that integrate with the HCP Terraform API. These actions let you create your own custom CI/CD workflows to meet your organization's needs.
HashiCorp resources:
- Learn how to use HCP Terraform to automate Terraform with GitHub Actions.
- Why should I use version control for my infrastructure?
- Terraform code style guide
- Write Terraform Tests
External resources:
Next steps
In this section of Define your processes, you learned how to implement version control for infrastructure configuration to enable collaboration, change tracking, and rollback capabilities. Standardize and automate workflows is part of the Define and automate processes pillar.
Refer to the following documents to learn more about version control and automation:
- Automation maturity model to understand your current automation level