hardgcloud

Create an OIDC provider in a Workload Identity Federation pool

command

gcloud iam workload-identity-pools providers create-oidc PROVIDER_ID --workload-identity-pool=POOL_ID --location=global --issuer-uri=ISSUER_URI --attribute-mapping='google.subject=assertion.sub'

also accepted

gcloud iam workload-identity-pools providers create-oidcgcloud iam workload-identity-pools providers create-oidc PROVIDER_ID

Command breakdown

Part of the Google Cloud CLI (gcloud) — Alpha & Beta category.

gcloudiamworkload-identity-poolsproviderscreate-oidcPROVIDER_ID--workload-identity-pool=POOL_ID--location=global--issuer-uri=ISSUER_URI--attribute-mapping='google.subject=assertion.sub'
FlagPurpose
--workload-identity-poolSet to: POOL_ID
--locationSet to: global
--issuer-uriSet to: ISSUER_URI
--attribute-mappingSet to: 'google.subject=assertion.sub'

Test your recall — not just your reading.

Practice with interactive quiz →