HashiCorp Cloud Platform
hcp iam service-principals
Command: hcp iam service-principals
The hcp iam service-principals
command group lets you create and manage
service principals.
A service principals is a principal that is typically used by an application or workload that interacts with HCP. Your application uses the service principal to authenticate to HCP so that users aren't directly involved.
Because service principals are principals, you can grant it permissions by granting a role. Refer to the examples for guidance.
Usage
$ hcp iam service-principals <command> [Optional Flags]
Aliases
sp
. For example:hcp iam sp <command>
Examples
Create a new service principal and grant it "admin" on the project set in the profile:
$ hcp iam service-principals create my-app --format=json
$ hcp projects add-iam-binding --member=my-app-sp-id --role=roles/admin
Command groups
keys
- Create and manage service principals keys.