Terraform
Fetch and review configuration versions
Stacks automatically detect when you push changes to your configuration from your VCS-linked repository. Every time you push changes to your repository, HCP Terraform automatically fetches your configuration and creates a new configuration version.
Whether automatic or manual, every time HCP Terraform fetches a new version of your configuration file, it creates a new configuration version, whether you made changes to that file or not. HCP Terraform uses a new configuration version to plan how that configuration version would affect each of your deployments.
This guide explains creating and reviewing new configuration versions in HCP Terraform.
Requirements
To view a Stack and its configurations, you must also be a member of a team in your organization with one of the following permissions:
Create configuration versions
Stacks automatically detect when you push changes to your configuration from your VCS-linked repository. Every time you push changes to your repository, HCP Terraform automatically fetches your configuration and creates a new configuration version.
Whether automatic or manual, every time HCP Terraform fetches a new version of your configuration file, it creates a new configuration version, whether you made changes to that file or not.
HCP Terraform then creates a new plan to roll out that new configuration version to your deployments. Learn more about reviewing and approving deployment plans.
Manually fetch new configurations
If you are not already on your Stack’s deployment page, navigate to it:
- In the navigation menu, click Projects under Manage.
- Select the project containing your Stack.
- Click Stacks in the navigation menu.
- Select the Stack you want to review.
Stacks automatically detect when you push changes to your configuration from your VCS-linked repository. Every time you push changes to your repository, HCP Terraform automatically fetches your configuration and creates a new configuration version.
If something changes outside of your configuration, you can fetch your configuration manually by clicking Fetch Configurations from VCS on a Stack’s Overview page or clicking Fetch configuration on a Stack’s Configurations page. For example, if someone changes resources directly in the AWS console, you can manually fetch your configuration to update your Stack.
Review configurations
To review your configuration versions, click Configurations in the side navigation menu of your Stack.
The Configurations page lists the available configuration versions of your Stack. The top-level dashboard lists your configurations and the percentage of deployments that use each configuration version.
Clicking on an individual configuration version reveals more details, including:
- The ID of the configuration version.
- The latest commit that HCP Terraform based this configuration version on.
- The deployments using this configuration version.
- The corresponding plans for each deployment, along with what triggered each plan. Clicking Quick View next to a plan lists the differences introduced in that plan.
You can use the Deployment filter to filter by deployment name or the Status filter to filter by plan status.
Download configuration data
You can download configuration data from a Stack so you can debug and analyze how your Stack changes over time.
Select one of the following options in the Inspect drop-down to download specific information about your configuration:
- Configuration event stream downloads a log file of your configuration’s events.
- Provider schemas downloads the schema of the providers of your configuration version.
- Source bundle downloads the files that HCP Terraform built this configuration version.
Next steps
The overview page for each Stack contains a chart of a Stack's configuration version and its respective deployment. You can approve or discard deployment plans to manage your deployments.