gcloud alpha run instances proxy

NAME
gcloud alpha run instances proxy - proxy an instance to localhost authenticating as the active account or with the specified token
SYNOPSIS
gcloud alpha run instances proxy INSTANCE [--port=PORT] [--region=REGION] [--token=TOKEN] [GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Runs a server on localhost that proxies requests to the specified Cloud Run Instance with credentials attached.

You can use this to test instances protected with IAM authentication.

The Cloud Run instance must be reachable from the machine running this command. For example, if the Cloud Run Instance is configured to only allow internal ingress, this command will not work from outside the instance's VPC network.

EXAMPLES
To proxy the instance 'my-instance' at localhost port 8080:
gcloud alpha run instances proxy my-instance --port=8080
POSITIONAL ARGUMENTS
Instance resource - Instance to proxy locally. This represents a Cloud resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.

To set the project attribute:

  • provide the argument INSTANCE on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

This must be specified.

INSTANCE
ID of the Instance or fully qualified identifier for the Instance.

To set the instances attribute:

  • provide the argument INSTANCE on the command line.
FLAGS
--port=PORT
Local port number to expose the proxied instance. If not specified, it will be set to 8080.
--region=REGION
Region in which the resource can be found. Alternatively, set the property [run/region].
--token=TOKEN
The specific identity token to add to all requests of the proxied service. If not specified, the identity token of the currently active authenticated account will be used (e.g. gcloud auth print-identity-token).
GCLOUD WIDE FLAGS
These flags are available to all commands: --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.

NOTES
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.