A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/enterprise/workspaces/settings/vcs below:

Configure workspace VCS connections in Terraform Enterprise | Terraform

You can connect any HCP Terraform workspace to a version control system (VCS) repository that contains a Terraform configuration. This page explains the workspace VCS connection settings in the HCP Terraform UI.

Refer to Terraform Configurations in HCP Terraform Workspaces for details on handling configuration versions and connected repositories. Refer to Connecting VCS Providers for a list of supported VCS providers and details about configuring VCS access, viewing VCS events, etc.

You can use the Update a Workspace endpoint in the Workspaces API to change one or more VCS settings. We also recommend using this endpoint to automate changing VCS connections for many workspaces at once. For example, when you move a VCS server or remove a deprecated API version.

To change a workspace's VCS settings:

  1. Sign in to HCP Terraform or Terraform Enterprise and find the workspace you want to update.
  2. Choose Settings from the sidebar, then Version Control.
  3. Choose the settings you want, then click Update VCS settings.

You can update the following types of VCS settings for the workspace.

VCS Connection

You can take one of the following actions:

Terraform Working Directory

Specify the directory where Terraform will execute runs. This defaults to the root directory in your repository, but you may want to specify another directory if you have directories for multiple different Terraform configurations within the same repository. For example, if you had one staging directory and one production directory.

A working directory is required when you use trigger prefixes.

Apply Method

Choose a workflow for Terraform runs.

Automatic Run Triggering

HCP Terraform uses your VCS provider's API to retrieve the changed files in your repository. You can choose one of the following options to specify which changes trigger Terraform runs.

Always trigger runs

This option instructs Terraform to begin a run when changes are pushed to any file within the repository. This can be useful for repositories that do not have multiple configurations but require a working directory for some other reason. However, we do not recommend this approach for true monorepos, as it queues unnecessary runs and slows down your ability to provision infrastructure.

Only trigger runs when files in specified paths change

This option instructs Terraform to begin new runs only for changes that affect specified files and directories. This behavior also applies to speculative plans on pull requests.

You can use trigger patterns and trigger prefixes in the Add path field to specify groups of files and directories.

Note: HCP Terraform triggers runs on all attached workspaces if it does not receive a list of changed files or if that list is too large to process. When this happens, HCP Terraform may show several runs with completed plans that do not result in infrastructure changes.

Trigger runs when a git tag is published

This option instructs Terraform to begin new runs only for changes that have a specific tag format.

The tag format can be chosen between the following options:

You must include an additional \ to escape the regex pattern when you manage your workspace with the hashicorp/tfe provider and trigger runs through matching git tags. Refer to Terraform escape sequences for more details.

Tag Format Regex Pattern Regex Pattern (Escaped) Semantic Versioning ^\d+.\d+.\d+$ ^\\d+.\\d+.\\d+$ Version contains a prefix \d+.\d+.\d+$ \\d+.\\d+.\\d+$ Version contains a suffix ^\d+.\d+.\d+ ^\\d+.\\d+.\\d+

HCP Terraform triggers runs for all tags matching this pattern, regardless of the value in the VCS Branch setting.

VCS Branch

This setting designates which branch of the repository HCP Terraform should use when the workspace is set to Always Trigger Runs or Only trigger runs when files in specified paths change. If you leave this setting blank, HCP Terraform uses the repository's default branch. If the workspace is set to trigger runs when a git tag is published, all tags will trigger runs, regardless of the branch specified in this setting.

Automatic Speculative Plans

Whether to perform speculative plans on pull requests to the connected repository, to assist in reviewing proposed changes. Automatic speculative plans are enabled by default, but you can disable them for any workspace.

Include Submodules on Clone

Select Include submodules on clone to recursively clone all of the repository's Git submodules when HCP Terraform fetches a configuration.

Note: The SSH key for cloning Git submodules is set in the VCS provider settings for the organization and is not related to the workspace's SSH key for Terraform modules.

We support glob patterns to describe a set of triggers for automatic runs. Refer to trigger patterns for details.

Supported wildcards:

The following examples demonstrate how to use the supported wildcards:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4