Terraform
Configure a Stack
This guide explains configuring a Stack’s name, description, project, and VCS settings 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:
- Organization-level Manage all projects or higher
- Project-level Read or higher to view a Stack
- Project-level Maintain or higher to update a Stack
Configure a Stack
You can configure a Stack by performing the following steps:
- Sign in to HCP Terraform and select the organization that contains your Stack.
- In the navigation menu, select Projects under Manage.
- Select the project containing your Stack.
- Select the Stack you want to configure.
- Select Settings in the side navigation.
- Update any of the following settings:
- Name
- Description
- Project, learn about moving a Stack to another project.
- Version control settings, including:
- You can also view any linked VCS repository, add a VCS connection, change your source repository, or disconnect your Stack from VCS. If you disconnect your Stack from VCS, you must upload further Stack configurations manually through the CLI.
- Stacks automatically trigger new runs when you push a configuration change to a linked repository. To stop HCP Terraform from automatically fetching configuration changes, toggle VCS Trigger Enabled.
- You can enable or disable Automatic speculative plans to have your Stack create plan-only runs for pull requests to your linked VCS repository.
- You can also configure Stacks to work from either a branch or tag-based workflow.
- You can Enable debug logging to be able to download detailed logs from your Stack's runs.
- You can change your Stack's Execution mode to either Remote or Agent. Refer to Change execution mode to learn more.
- Click Save settings to apply your changes.
Move a Stack to another project
To move a Stack, you must have the Manage all Projects organization permission or explicit team admin privileges on both the source and destination projects. Moving a Stack may alter or remove access for some teams based on their project-level permissions.
Upstream Stacks must be in the same project as their downstream Stacks. Moving an upstream Stack to another project breaks any downstream Stack inputs, affecting future plans. Move upstream and downstream Stacks together to avoid disruptions. Learn more about passing data from one Stack to another.
Change execution mode
By default, HCP Terraform deploys infrastructure remotely using its own disposable virtual machines. This default execution mode is named Remote mode.
HCP Terraform agents let HCP Terraform communicate with isolated, private, or on-premises infrastructure. After setting up an agent and an agent pool, you can choose to change a Stack's execution mode to Agent to have HCP Terraform execute your Stack runs on an agent. To learn more about setting up agents, refer to Install and run agents.
Next steps
After configuring your Stack, you can learn more about how to review your Stack’s deployment runs or destroy your Stack.