hashicorp/Authenticate to HashiCorp Cloud Platform

Authenticate to HashiCorp Cloud Platform from GitHub Actions via Workload Identity Federation or service principal keys.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
workload_identity_providerThe 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
audienceThe 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_idThe client ID of the service principal. This is mutually exclusive with "workload_identity_provider".no
client_secretThe client secret of the service principal. This is mutually exclusive with "workload_identity_provider".no
set_access_tokenIf 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.nofalse
export_environment_variablesIf 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.notrue
namedescription
organization_idThe organization ID for which the authenticated service principal belongs to.
project_idThe project ID of the authenticated service principal. If the service principal is an organization level service principal, this value will be unset.
credentials_file_pathPath on the local filesystem where the generated credentials file resides.
access_tokenThe access token for calling HCP APIs. This is only available when "set_access_token" is true.