This topic describes how to create and manage workspaces in HCP Terraform and Terraform Enterprise UI. A workspace is a group of infrastructure resources managed by Terraform. Refer to Workspaces overview for additional information.
Hands-on: Try the Get Started - HCP Terraform tutorials.
Create new workspaces when you need to manage a new collection of infrastructure resources. You can use the following methods to create workspaces:
POST
call to the /organizations/:organization_name/workspaces
endpoint to create a workspace. Refer to the API documentation for instructions.tfe
provider and add the tfe_workspace
resource to your configuration. Refer to the tfe
provider documentation in the Terraform registry for instructions.Each workspace belongs to a project. Refer to Manage projects for additional information.
You must be a member of a team with one of the following permissions enabled to create and manage workspaces:
We recommend using consistent and informative names for new workspaces. One common approach is combining the workspace's important attributes in a consistent order. Attributes can be any defining characteristic of a workspace, such as the component, the component’s run environment, and the region where the workspace is provisioning infrastructure.
This strategy could produce the following example workspace names:
You can add additional attributes to your workspace names as needed. For example, you may add the infrastructure provider, datacenter, or line of business.
We recommend using 90 characters or less for the name of your workspace.
Complete the following steps to use the HCP Terraform or Terraform Enterprise UI to create a workspace:
For CLI or API-driven workflow, the system opens the new workspace overview. For version control workspaces, the Configure Terraform variables page appears.
Configure Terraform variables for VCS workflowsAfter you create a new workspace from a version control repository, HCP Terraform scans its configuration files for Terraform variables and displays variables without default values or variables that are undefined in an existing global or project-scoped variable set. Terraform cannot perform successful runs in the workspace until you set values for these variables.
Choose one of the following actions:
auto.tfvars
file. Click Save variables to add these variables to the workspace.If you have already configured all Terraform variables, we recommend manually starting a run to prepare VCS-driven workspaces. You may also want to do one or more of the following actions:
If you connected a VCS repository to the workspace, HCP Terraform automatically registers a webhook with your VCS provider. A workspace with no runs will not accept new runs from a VCS webhook, so you must manually start at least one run.
After you manually start a run, HCP Terraform automatically queues a plan when new commits appear in the selected branch of the linked repository or someone opens a pull request on that branch. Refer to Webhooks for more details.
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