gcloud iam workforce-pools create-cred-config AUDIENCE --output-file=OUTPUT_FILE --workforce-pool-user-project=WORKFORCE_POOL_USER_PROJECT (--credential-source-file=CREDENTIAL_SOURCE_FILE | --credential-source-url=CREDENTIAL_SOURCE_URL | --executable-command=EXECUTABLE_COMMAND) [--credential-source-field-name=CREDENTIAL_SOURCE_FIELD_NAME] [--credential-source-headers=[key=value,…]] [--credential-source-type=CREDENTIAL_SOURCE_TYPE] [--subject-token-type=SUBJECT_TOKEN_TYPE] [--executable-interactive-timeout-millis=EXECUTABLE_INTERACTIVE_TIMEOUT_MILLIS --executable-output-file=EXECUTABLE_OUTPUT_FILE --executable-timeout-millis=EXECUTABLE_TIMEOUT_MILLIS] [--service-account=SERVICE_ACCOUNT : --service-account-token-lifetime-seconds=SERVICE_ACCOUNT_TOKEN_LIFETIME_SECONDS] [GCLOUD_WIDE_FLAG …]
gcloud iam workforce-pools create-cred-config locations/$REGION/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID --credential-source-file=$PATH_TO_OIDC_ID_TOKEN --workforce-pool-user-project=$PROJECT_NUMBER --output-file=credentials.jsonTo create a URL-sourced credential configuration for your project, run:
gcloud iam workforce-pools create-cred-config locations/$REGION/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID --credential-source-url=$URL_FOR_OIDC_TOKEN --credential-source-headers=Key=Value --workforce-pool-user-project=$PROJECT_NUMBER --output-file=credentials.jsonTo create an executable-source credential configuration for your project, run the following command:
gcloud iam workforce-pools create-cred-config locations/$REGION/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID --executable-command=$EXECUTABLE_COMMAND --executable-timeout-millis=30000 --executable-output-file=$CACHE_FILE --workforce-pool-user-project=$PROJECT_NUMBER --output-file=credentials.jsonAUDIENCE--output-file=OUTPUT_FILE--workforce-pool-user-project=WORKFORCE_POOL_USER_PROJECT--credential-source-file=CREDENTIAL_SOURCE_FILE--credential-source-url=CREDENTIAL_SOURCE_URL--executable-command=EXECUTABLE_COMMAND--credential-source-field-name=CREDENTIAL_SOURCE_FIELD_NAME--credential-source-headers=[key=value,…]--credential-source-type=CREDENTIAL_SOURCE_TYPE--subject-token-type=SUBJECT_TOKEN_TYPE--executable-interactive-timeout-millis=EXECUTABLE_INTERACTIVE_TIMEOUT_MILLIS--executable-output-file=EXECUTABLE_OUTPUT_FILE--executable-timeout-millis=EXECUTABLE_TIMEOUT_MILLIS--service-account=SERVICE_ACCOUNT--service-account-token-lifetime-seconds=SERVICE_ACCOUNT_TOKEN_LIFETIME_SECONDSconstraints/iam.allowServiceAccountCredentialLifetimeExtension
constraint.
--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha iam workforce-pools create-cred-configgcloud beta iam workforce-pools create-cred-config
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.