Terraform
Managing Projects
Projects let you organize your workspaces and scope access to workspace resources.
Permissions
You must be a member of a team with the Manage all Projects organization-level permissions permissions to create a project.
You must be a member of a team with the update team access to add a new team access for organization-visible teams for a project.
You must be a member of a team with update and delete permissions to be able to update and delete teams respectively.
View a Project
To view your organization's projects:
- Click Projects.
- Search for a project that you want to review by scrolling or searching for a project name in the search bar above the project table.
- Click on a project's name to view more details.
Create a Project
To create a new project:
- Click Projects.
- Click + New project. The Create a new project modal appears.
- Enter a Project Name. The name must be unique within the organization and can only include letters, numbers, inner spaces, dashes (-), and underscores (_).
- Optionally, enter a Project Description.
- Click Create.
HCP Terraform returns a new project page displaying all the project information.
Edit a Project
To 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 HCP Terraform 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.
Note: Automatic destroy plans do not prompt you for apply approval in the HCP Terraform 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.
HCP Terraform returns to the Projects view with the deleted project removed from the list.