hashicorp/Authenticate to HashiCorp Cloud Platform
Authenticate to HashiCorp Cloud Platform from GitHub Actions via Workload Identity Federation or service principal keys.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| workload_identity_provider | The full resource name of the Workload Identity Provider, for example: "iam/project/750ccb51-5426-4935-966a-582e8ec106e2/service-principal/cicd/workload-identity-provider/github". This is mutually exclusive with "client_id" and "client_secret". | no | — |
| audience | The value for the audience (aud) parameter in GitHub's generated OIDC token. This value defaults to the value of "workload_identity_provider", which is also the default value HCP expects for the audience parameter on the token when exchanging. It should be rare for this value to be set. | no | — |
| client_id | The client ID of the service principal. This is mutually exclusive with "workload_identity_provider". | no | — |
| client_secret | The client secret of the service principal. This is mutually exclusive with "workload_identity_provider". | no | — |
| set_access_token | If true, the action will set the access token as an output. This is useful for downstream steps that need to directly use the access token to authenticate to HashiCorp Cloud Platform. | no | false |
| export_environment_variables | If true, the action will export the HCP_CRED_FILE environment variable for subsequent steps to use. If false, the action will not export any environment variables, meaning future steps are unlikely to be automatically authenticated to HCP and the access token must be used directly. | no | true |
Outputs
| name | description |
|---|---|
| organization_id | The organization ID for which the authenticated service principal belongs to. |
| project_id | The project ID of the authenticated service principal. If the service principal is an organization level service principal, this value will be unset. |
| credentials_file_path | Path on the local filesystem where the generated credentials file resides. |
| access_token | The access token for calling HCP APIs. This is only available when "set_access_token" is true. |