Introduction
This article will provide instructions on how to create and delete service principal credentials.
Prerequisites
- This action may only be performed by a user with the Owner/Admin role.
Use Case
Terraform HCP provider supports authentication via a Client ID and a Client Secret, which are obtained on the creation of a service principal key.
Procedure
How-to create a service principal credential
- Click on Access control (IAM).

- Click on Service principals.

- Click on Create service principal.

- Enter a desired name and choose a role to be associated with the service principal.

- Click on the created service principal and select Create service principal key, This will generate a Client ID and Client secret to use with the Terraform HCP provider.

- Be sure to copy the client secret. You will not be able to retrieve it later.

How-to delete a service principal credential
- Click on Service principals.

- Click on the service principal to delete, click on the ellipsis (…), and click to delete the associated key.

- Type in “DELETE” or “Delete” depending on which prompt you receive. Please make sure to enter the phrase exactly as prompted as it is case sensitive.

- Click on Manage, click to delete the service principal.

- Type in “DELETE” or “Delete” depending on which prompt you receive. Please make sure to enter the phrase exactly as prompted as it is case sensitive.
