Manage projects
This topic describes how to create and manage projects in HCP Terraform and Terraform Enterprise. A project is a folder containing one or more workspaces.
Requirements
You must have the following permissions to manage projects:
- You must be a member of a team with the Manage all Projects permissions enabled to create a project. Refer to Organization Permissions for additional information.
- You must be a member of a team with the Visible option enabled under Visibility in the organization settings to configure a new team's access to the project. Refer to Team Visibility for additional information.
- You must be a member of a team with update and delete permissions to be able to update and delete teams respectively.
To delete tags on a project, you must be member of a team with the Admin permission group enabled for the project.
To create tags for a project, you must be member of a team with the Write permission group enabled for the project.
View a project
To view your organization's projects:
- Click Projects.
- Search for a project that you want to view. You can use the following methods:
- Sort by column header.
- Use the search bar to search on the name of a project.
- Click on a project's name to view more details.
Create a project
- Click Projects.
- Click + New project.
- Specify a name for the project. The name must be unique within the organization and can only include letters, numbers, inner spaces, hyphens, and underscores.
- Add a description for the project. This field is optional.
- Click Create to finish creating the project.
A new project page opens that displays information about the project.
Edit a project
- Click Projects.
- Click on a project name of the project you want to edit.
- Click Settings.
On this General settings page, you can update the project name, project description, and delete the project. On the Team access page, you can modify team access to the project.
Automatically destroy inactive workspaces
You can configure Terraform Enterprise to automatically destroy each workspace's infrastructure in a project after a period of inactivity. A workspace is inactive if the workspace's state has not changed within your designated time period.
If you configure a project to auto-destroy its infrastructure when inactive, any run that updates Terraform state further delays the scheduled auto-destroy time by the length of your designated timeframe.
Warning: Automatic destroy plans do not prompt you for apply approval in the user interface. We recommend only using this setting for development environments.
To schedule an auto-destroy run after a period of workspace inactivity:
- Navigate to the project's Settings > Auto-destroy Workspaces page.
- Click Set up default.
- Select or customize a desired timeframe of inactivity.
- Click Confirm default.
You can configure an individual workspace's auto-destroy settings to override this default configuration. Refer to automatically destroy workspaces for more information.
Delete a project
You can only delete projects that do not contain workspaces.
To delete an empty project:
- Click Projects.
- Search for a project that you want to review by scrolling down the table or searching for a project name in the search bar above the project table.
- Click Settings. The settings view for the selected project appears.
- Click the Delete button. A Delete project modal appears.
- Click the Delete button to confirm the deletion.
Terraform Enterprise returns to the Projects view with the deleted project removed from the list.