gcloud compute ssl-certificates create NAME (--domains=DOMAIN,[DOMAIN,…] | --certificate=LOCAL_FILE_PATH --private-key=LOCAL_FILE_PATH) [--description=DESCRIPTION] [--global | --region=REGION] [GCLOUD_WIDE_FLAG …]
gcloud compute ssl-certificates create creates SSL certificate
resources, which you can use in a target HTTPS or target SSL proxy. An SSL
certificate resource consists of a certificate and private key. The private key
is encrypted before it is stored.
You can create either a managed or a self-managed SslCertificate resource. A
managed SslCertificate is provisioned and renewed for you. A self-managed
certificate is created by passing the certificate obtained from Certificate
Authority through --certificate and --private-key
flags.
gcloud compute ssl-certificates create my-cert --certificate=foo/cert --private-key=foo/pkNAME--domains=DOMAIN,[DOMAIN,…]--certificate=LOCAL_FILE_PATH--private-key=LOCAL_FILE_PATH--description=DESCRIPTION--global--region=REGION
To avoid prompting when this flag is omitted, you can set the
property:
compute/region
gcloud config set compute/region REGIONA list of regions can be fetched by running:
gcloud compute regions listTo unset the property, run:
gcloud config unset compute/regionCLOUDSDK_COMPUTE_REGION.
--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 compute ssl-certificates creategcloud beta compute ssl-certificates creategcloud preview compute ssl-certificates create
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.