2022-03-01 04:29:52 +00:00
|
|
|
NAME
|
|
|
|
|
gcloud sql instances create - creates a new Cloud SQL instance
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
|
gcloud sql instances create INSTANCE
|
|
|
|
|
[--activation-policy=ACTIVATION_POLICY]
|
2025-10-23 11:05:02 +00:00
|
|
|
[--active-directory-dns-servers=[DNS_SERVER_IP_ADDRESS,...]]
|
|
|
|
|
[--active-directory-domain=ACTIVE_DIRECTORY_DOMAIN]
|
|
|
|
|
[--active-directory-mode=ACTIVE_DIRECTORY_MODE]
|
|
|
|
|
[--active-directory-organizational-unit=ACTIVE_DIRECTORY_ORGANIZATIONAL_UNIT]
|
|
|
|
|
[--active-directory-secret-manager-key=ACTIVE_DIRECTORY_SECRET_MANAGER_KEY]
|
|
|
|
|
[--[no-]assign-ip] [--async] [--audit-bucket-path=AUDIT_BUCKET_PATH]
|
2022-06-23 08:40:08 +00:00
|
|
|
[--audit-retention-interval=AUDIT_RETENTION_INTERVAL]
|
|
|
|
|
[--audit-upload-interval=AUDIT_UPLOAD_INTERVAL]
|
|
|
|
|
[--authorized-networks=NETWORK,[NETWORK,...]]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--availability-type=AVAILABILITY_TYPE] [--no-backup]
|
|
|
|
|
[--backup-location=BACKUP_LOCATION]
|
2023-11-09 11:45:52 +00:00
|
|
|
[--backup-start-time=BACKUP_START_TIME] [--cascadable-replica]
|
2025-10-23 11:05:02 +00:00
|
|
|
[--clear-active-directory-dns-servers] [--collation=COLLATION]
|
2025-09-04 11:11:30 +00:00
|
|
|
[--connection-pool-flags=FLAG=VALUE,[FLAG=VALUE,...]]
|
|
|
|
|
[--connector-enforcement=CONNECTOR_ENFORCEMENT] [--cpu=CPU]
|
|
|
|
|
[--custom-subject-alternative-names=DNS,[DNS,[DNS]]]
|
2025-05-07 10:56:18 +00:00
|
|
|
[--database-flags=FLAG=VALUE,[FLAG=VALUE,...]]
|
2022-06-23 08:40:08 +00:00
|
|
|
[--database-version=DATABASE_VERSION; default="MYSQL_8_0"]
|
2022-08-17 09:22:03 +00:00
|
|
|
[--[no-]deletion-protection]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--deny-maintenance-period-end-date=DENY_MAINTENANCE_PERIOD_END_DATE]
|
|
|
|
|
[--deny-maintenance-period-start-date=DENY_MAINTENANCE_PERIOD_START_DATE]
|
|
|
|
|
[--deny-maintenance-period-time=DENY_MAINTENANCE_PERIOD_TIME]
|
2025-10-15 10:52:53 +00:00
|
|
|
[--edition=EDITION] [--enable-auto-upgrade-minor-version]
|
|
|
|
|
[--enable-bin-log] [--[no-]enable-connection-pooling]
|
|
|
|
|
[--[no-]enable-data-cache] [--[no-]enable-dataplex-integration]
|
2024-03-27 09:52:07 +00:00
|
|
|
[--[no-]enable-google-ml-integration] [--enable-google-private-path]
|
|
|
|
|
[--enable-password-policy] [--enable-point-in-time-recovery]
|
2025-09-04 11:11:30 +00:00
|
|
|
[--enforce-new-sql-network-architecture]
|
|
|
|
|
[--failover-replica-name=FAILOVER_REPLICA_NAME] [--[no-]final-backup]
|
|
|
|
|
[--final-backup-retention-days=FINAL_BACKUP_RETENTION_DAYS]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--[no-]insights-config-query-insights-enabled]
|
|
|
|
|
[--insights-config-query-plans-per-minute=INSIGHTS_CONFIG_QUERY_PLANS_PER_MINUTE]
|
|
|
|
|
[--insights-config-query-string-length=INSIGHTS_CONFIG_QUERY_STRING_LENGTH]
|
|
|
|
|
[--[no-]insights-config-record-application-tags]
|
|
|
|
|
[--[no-]insights-config-record-client-address]
|
2025-07-30 10:59:26 +00:00
|
|
|
[--instance-type=INSTANCE_TYPE]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--maintenance-release-channel=MAINTENANCE_RELEASE_CHANNEL]
|
|
|
|
|
[--maintenance-window-day=MAINTENANCE_WINDOW_DAY]
|
|
|
|
|
[--maintenance-window-hour=MAINTENANCE_WINDOW_HOUR]
|
|
|
|
|
[--master-instance-name=MASTER_INSTANCE_NAME] [--memory=MEMORY]
|
2025-07-30 10:59:26 +00:00
|
|
|
[--network=NETWORK] [--node-count=NODE_COUNT]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--password-policy-complexity=PASSWORD_POLICY_COMPLEXITY]
|
|
|
|
|
[--[no-]password-policy-disallow-username-substring]
|
|
|
|
|
[--password-policy-min-length=PASSWORD_POLICY_MIN_LENGTH]
|
|
|
|
|
[--password-policy-password-change-interval=PASSWORD_POLICY_PASSWORD_CHANGE_INTERVAL]
|
|
|
|
|
[--password-policy-reuse-interval=PASSWORD_POLICY_REUSE_INTERVAL]
|
2024-10-16 09:53:35 +00:00
|
|
|
[--psc-auto-connections=[network=NETWORK],[project=PROJECT]]
|
2023-07-20 11:47:25 +00:00
|
|
|
[--[no-]recreate-replicas-on-primary-crash]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--replica-type=REPLICA_TYPE] [--replication=REPLICATION]
|
2025-03-19 10:42:21 +00:00
|
|
|
[--require-ssl] [--[no-]retain-backups-on-delete]
|
|
|
|
|
[--retained-backups-count=RETAINED_BACKUPS_COUNT]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--retained-transaction-log-days=RETAINED_TRANSACTION_LOG_DAYS]
|
2024-12-11 10:18:23 +00:00
|
|
|
[--root-password=ROOT_PASSWORD] [--server-ca-mode=SERVER_CA_MODE]
|
2026-02-11 11:28:25 +00:00
|
|
|
[--server-ca-pool=SERVER_CA_POOL]
|
|
|
|
|
[--server-certificate-rotation-mode=SERVER_CERTIFICATE_ROTATION_MODE]
|
|
|
|
|
[--ssl-mode=SSL_MODE] [--[no-]storage-auto-increase]
|
2025-03-19 10:42:21 +00:00
|
|
|
[--storage-provisioned-iops=STORAGE_PROVISIONED_IOPS]
|
|
|
|
|
[--storage-provisioned-throughput=STORAGE_PROVISIONED_THROUGHPUT]
|
2024-12-11 10:18:23 +00:00
|
|
|
[--storage-size=STORAGE_SIZE] [--storage-type=STORAGE_TYPE]
|
2025-02-20 10:40:27 +00:00
|
|
|
[--tags=TAG=VALUE,[TAG=VALUE,...]]
|
2024-12-11 10:18:23 +00:00
|
|
|
[--threads-per-core=THREADS_PER_CORE] [--tier=TIER, -t TIER]
|
|
|
|
|
[--time-zone=TIME_ZONE] [--timeout=TIMEOUT; default=3600]
|
2023-08-09 11:23:49 +00:00
|
|
|
[--allowed-psc-projects=PROJECT,[PROJECT,...]
|
|
|
|
|
--enable-private-service-connect]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--disk-encryption-key=DISK_ENCRYPTION_KEY
|
|
|
|
|
: --disk-encryption-key-keyring=DISK_ENCRYPTION_KEY_KEYRING
|
|
|
|
|
--disk-encryption-key-location=DISK_ENCRYPTION_KEY_LOCATION
|
|
|
|
|
--disk-encryption-key-project=DISK_ENCRYPTION_KEY_PROJECT]
|
2025-10-23 11:05:02 +00:00
|
|
|
[--[no-]auto-scale-disable-scale-in --[no-]auto-scale-enabled
|
|
|
|
|
--auto-scale-in-cooldown-seconds=AUTO_SCALE_IN_COOLDOWN_SECONDS
|
|
|
|
|
--auto-scale-max-node-count=AUTO_SCALE_MAX_NODE_COUNT
|
|
|
|
|
--auto-scale-min-node-count=AUTO_SCALE_MIN_NODE_COUNT
|
|
|
|
|
--auto-scale-out-cooldown-seconds=AUTO_SCALE_OUT_COOLDOWN_SECONDS
|
|
|
|
|
--auto-scale-target-metrics=[METRIC=VALUE,...]]
|
2022-03-01 04:29:52 +00:00
|
|
|
[--region=REGION; default="us-central" | --gce-zone=GCE_ZONE
|
|
|
|
|
| --secondary-zone=SECONDARY_ZONE --zone=ZONE] [GCLOUD_WIDE_FLAG ...]
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Creates a new Cloud SQL instance.
|
|
|
|
|
|
|
|
|
|
EXAMPLES
|
2025-03-19 10:42:21 +00:00
|
|
|
To create a MySQL 8.0 instance with ID prod-instance that has 2 CPUs, 4 GB
|
2022-03-01 04:29:52 +00:00
|
|
|
of RAM, and is in the region us-central1 (a zone will be auto-assigned),
|
|
|
|
|
where the 'root' user has its password set to password123, run:
|
|
|
|
|
|
|
|
|
|
$ gcloud sql instances create prod-instance \
|
2025-03-19 10:42:21 +00:00
|
|
|
--database-version=MYSQL_8_0 --cpu=2 --memory=4GB \
|
2022-03-01 04:29:52 +00:00
|
|
|
--region=us-central1 --root-password=password123
|
|
|
|
|
|
2025-03-19 10:42:21 +00:00
|
|
|
To create a Postgres 15 instance with ID prod-instance that has 2 CPUs, 8
|
2022-03-01 04:29:52 +00:00
|
|
|
GiB of RAM, and is in the zone us-central1-a, where the 'postgres' user has
|
|
|
|
|
its password set to password123, run:
|
|
|
|
|
|
|
|
|
|
$ gcloud sql instances create prod-instance \
|
2025-03-19 10:42:21 +00:00
|
|
|
--database-version=POSTGRES_15 --cpu=2 --memory=8GiB \
|
2022-03-01 04:29:52 +00:00
|
|
|
--zone=us-central1-a --root-password=password123
|
|
|
|
|
|
2025-03-19 10:42:21 +00:00
|
|
|
To create a SQL Server 2022 Express instance with ID prod-instance that has
|
2022-03-01 04:29:52 +00:00
|
|
|
2 CPUs, 3840MiB of RAM, and is in the zone us-central1-a, where the
|
|
|
|
|
'sqlserver' user has its password set to password123, run:
|
|
|
|
|
|
|
|
|
|
$ gcloud sql instances create prod-instance \
|
2025-03-19 10:42:21 +00:00
|
|
|
--database-version=SQLSERVER_2022_EXPRESS --cpu=2 \
|
2022-03-01 04:29:52 +00:00
|
|
|
--memory=3840MiB --zone=us-central1-a \
|
|
|
|
|
--root-password=password123
|
|
|
|
|
|
|
|
|
|
POSITIONAL ARGUMENTS
|
|
|
|
|
INSTANCE
|
|
|
|
|
Cloud SQL instance ID.
|
|
|
|
|
|
|
|
|
|
FLAGS
|
|
|
|
|
--activation-policy=ACTIVATION_POLICY
|
|
|
|
|
Activation policy for this instance. This specifies when the instance
|
|
|
|
|
should be activated and is applicable only when the instance state is
|
2023-06-15 10:31:27 +00:00
|
|
|
RUNNABLE. The default is always. More information on activation
|
2022-03-01 04:29:52 +00:00
|
|
|
policies can be found here:
|
2022-04-13 08:33:42 +00:00
|
|
|
https://cloud.google.com/sql/docs/mysql/start-stop-restart-instance#activation_policy.
|
2023-06-15 10:31:27 +00:00
|
|
|
ACTIVATION_POLICY must be one of: always, never.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2025-10-23 11:05:02 +00:00
|
|
|
--active-directory-dns-servers=[DNS_SERVER_IP_ADDRESS,...]
|
|
|
|
|
A comma-separated list of the DNS servers to be used for Active
|
|
|
|
|
Directory. Only available for SQL Server instances. E.g:
|
|
|
|
|
10.0.0.1,10.0.0.2
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--active-directory-domain=ACTIVE_DIRECTORY_DOMAIN
|
|
|
|
|
Managed Service for Microsoft Active Directory domain this instance is
|
|
|
|
|
joined to. Only available for SQL Server instances.
|
|
|
|
|
|
2025-10-23 11:05:02 +00:00
|
|
|
--active-directory-mode=ACTIVE_DIRECTORY_MODE
|
|
|
|
|
Defines the Active Directory mode. Only available for SQL Server
|
|
|
|
|
instances. ACTIVE_DIRECTORY_MODE must be one of:
|
|
|
|
|
MANAGED_ACTIVE_DIRECTORY, CUSTOMER_MANAGED_ACTIVE_DIRECTORY.
|
|
|
|
|
|
|
|
|
|
--active-directory-organizational-unit=ACTIVE_DIRECTORY_ORGANIZATIONAL_UNIT
|
|
|
|
|
Defines the organizational unit to be used for Active Directory. Only
|
|
|
|
|
available for SQL Server instances. E.g:
|
|
|
|
|
OU=Cloud,DC=ad,DC=example,DC=com
|
|
|
|
|
|
|
|
|
|
--active-directory-secret-manager-key=ACTIVE_DIRECTORY_SECRET_MANAGER_KEY
|
|
|
|
|
The secret manager key storing administrator credentials. Only
|
|
|
|
|
available for SQL Server instances.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--[no-]assign-ip
|
|
|
|
|
Assign a public IP address to the instance. This is a public,
|
|
|
|
|
externally available IPv4 address that you can use to connect to your
|
2023-01-19 00:56:33 +00:00
|
|
|
instance when properly authorized. Use --assign-ip to enable and
|
2022-03-01 04:29:52 +00:00
|
|
|
--no-assign-ip to disable.
|
|
|
|
|
|
|
|
|
|
--async
|
|
|
|
|
Return immediately, without waiting for the operation in progress to
|
|
|
|
|
complete.
|
|
|
|
|
|
2022-06-23 08:40:08 +00:00
|
|
|
--audit-bucket-path=AUDIT_BUCKET_PATH
|
|
|
|
|
The location, as a Cloud Storage bucket, to which audit files are
|
|
|
|
|
uploaded. The URI is in the form gs://bucketName/folderName. Only
|
|
|
|
|
available for SQL Server instances.
|
|
|
|
|
|
|
|
|
|
--audit-retention-interval=AUDIT_RETENTION_INTERVAL
|
|
|
|
|
The number of days for audit log retention on disk, for example, 3dfor
|
|
|
|
|
3 days. Only available for SQL Server instances.
|
|
|
|
|
|
|
|
|
|
--audit-upload-interval=AUDIT_UPLOAD_INTERVAL
|
|
|
|
|
How often to upload audit logs (audit files), for example, 30mfor 30
|
|
|
|
|
minutes. Only available for SQL Server instances.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--authorized-networks=NETWORK,[NETWORK,...]
|
|
|
|
|
The list of external networks that are allowed to connect to the
|
|
|
|
|
instance. Specified in CIDR notation, also known as 'slash' notation
|
|
|
|
|
(e.g. 192.168.100.0/24).
|
|
|
|
|
|
|
|
|
|
--availability-type=AVAILABILITY_TYPE
|
|
|
|
|
Specifies level of availability. AVAILABILITY_TYPE must be one of:
|
|
|
|
|
|
|
|
|
|
regional
|
|
|
|
|
Provides high availability and is recommended for production
|
|
|
|
|
instances; instance automatically fails over to another zone within
|
|
|
|
|
your selected region.
|
|
|
|
|
zonal
|
|
|
|
|
Provides no failover capability. This is the default.
|
|
|
|
|
|
|
|
|
|
--backup
|
|
|
|
|
Enables daily backup. Enabled by default, use --no-backup to disable.
|
|
|
|
|
|
|
|
|
|
--backup-location=BACKUP_LOCATION
|
|
|
|
|
Choose where to store your backups. Backups are stored in the closest
|
|
|
|
|
multi-region location to you by default. Only customize if needed.
|
|
|
|
|
|
|
|
|
|
--backup-start-time=BACKUP_START_TIME
|
|
|
|
|
Start time of daily backups, specified in the HH:MM format, in the UTC
|
|
|
|
|
timezone.
|
|
|
|
|
|
2023-11-09 11:45:52 +00:00
|
|
|
--cascadable-replica
|
|
|
|
|
Specifies whether a SQL Server replica is a cascadable replica. A
|
|
|
|
|
cascadable replica is a SQL Server cross-region replica that supports
|
|
|
|
|
replica(s) under it. This flag only takes effect when the
|
|
|
|
|
--master-instance-name flag is set, and the replica under creation is
|
|
|
|
|
in a different region than the primary instance.
|
|
|
|
|
|
2025-10-23 11:05:02 +00:00
|
|
|
--clear-active-directory-dns-servers
|
|
|
|
|
Removes the list of DNS Servers from the Active Directory Config.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--collation=COLLATION
|
|
|
|
|
Cloud SQL server-level collation setting, which specifies the set of
|
|
|
|
|
rules for comparing characters in a character set.
|
|
|
|
|
|
2025-09-04 11:11:30 +00:00
|
|
|
--connection-pool-flags=FLAG=VALUE,[FLAG=VALUE,...]
|
|
|
|
|
Comma-separated list of connection pool flags to set on the instance
|
|
|
|
|
connection pool. Use an equals sign to separate flag name and value.
|
|
|
|
|
More information on available flags can be found here:
|
|
|
|
|
https://cloud.google.com/sql/docs/mysql/managed-connection-pooling#configuration-options
|
|
|
|
|
for MySQL and
|
|
|
|
|
https://cloud.google.com/sql/docs/postgres/managed-connection-pooling#configuration-options
|
|
|
|
|
for PostgreSQL. (e.g., --connection-pool-flags
|
|
|
|
|
max_pool_size=1000,max_client_connections=20)
|
|
|
|
|
|
2023-01-19 00:56:33 +00:00
|
|
|
--connector-enforcement=CONNECTOR_ENFORCEMENT
|
|
|
|
|
Cloud SQL Connector enforcement mode. It determines how Cloud SQL
|
|
|
|
|
Connectors are used in the connection. See the list of modes here
|
|
|
|
|
(https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances#connectorenforcement).
|
|
|
|
|
CONNECTOR_ENFORCEMENT must be one of:
|
|
|
|
|
|
|
|
|
|
CONNECTOR_ENFORCEMENT_UNSPECIFIED
|
|
|
|
|
The requirement for Cloud SQL connectors is unknown.
|
|
|
|
|
NOT_REQUIRED
|
|
|
|
|
Does not require Cloud SQL connectors.
|
|
|
|
|
REQUIRED
|
|
|
|
|
Requires all connections to use Cloud SQL connectors, including the
|
|
|
|
|
Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors.
|
|
|
|
|
Note: This disables all existing authorized networks.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--cpu=CPU
|
|
|
|
|
Whole number value indicating how many cores are desired in the
|
|
|
|
|
machine. Both --cpu and --memory must be specified if a custom machine
|
2025-06-14 05:31:37 +00:00
|
|
|
type is desired, and the --tier flag must be omitted.--cpu and --memory
|
|
|
|
|
flags are not compatible with the Enterprise Plus edition. These flags
|
|
|
|
|
should not be used when creating an Enterprise Plus edition, as the
|
|
|
|
|
machine configuration is determined by the --tier flag instead.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2025-05-07 10:56:18 +00:00
|
|
|
--custom-subject-alternative-names=DNS,[DNS,[DNS]]
|
|
|
|
|
A comma-separated list of DNS names to add to the instance's SSL
|
|
|
|
|
certificate. A custom SAN is a structured way to add additional DNS
|
|
|
|
|
names (host names) that are not managed by Cloud SQL to an instance. It
|
|
|
|
|
allows for hostname verification during establishment of a database
|
|
|
|
|
connection using the DNS name over SSL/TLS. When you create and/or
|
|
|
|
|
update an instance, you can add a comma-separated list of up to three
|
|
|
|
|
DNS names to the server certificate of your instance.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--database-flags=FLAG=VALUE,[FLAG=VALUE,...]
|
|
|
|
|
Comma-separated list of database flags to set on the instance. Use an
|
|
|
|
|
equals sign to separate flag name and value. Flags without values, like
|
|
|
|
|
skip_grant_tables, can be written out without a value after, e.g.,
|
|
|
|
|
skip_grant_tables=. Use on/off for booleans. View the Instance Resource
|
|
|
|
|
API for allowed flags. (e.g., --database-flags
|
|
|
|
|
max_allowed_packet=55555,skip_grant_tables=,log_output=1)
|
|
|
|
|
|
2022-06-23 08:40:08 +00:00
|
|
|
--database-version=DATABASE_VERSION; default="MYSQL_8_0"
|
|
|
|
|
The database engine type and versions. If left unspecified, MYSQL_8_0
|
|
|
|
|
is used. See the list of database versions at
|
2022-03-01 04:29:52 +00:00
|
|
|
https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/SqlDatabaseVersion.
|
2022-05-11 08:44:01 +00:00
|
|
|
Apart from listed major versions, DATABASE_VERSION also accepts
|
|
|
|
|
supported minor versions. DATABASE_VERSION must be one of: MYSQL_5_6,
|
2024-07-17 09:30:28 +00:00
|
|
|
MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10,
|
|
|
|
|
POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15,
|
2025-10-08 11:07:39 +00:00
|
|
|
POSTGRES_16, POSTGRES_17, POSTGRES_18, SQLSERVER_2017_EXPRESS,
|
|
|
|
|
SQLSERVER_2017_WEB, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE,
|
2024-07-17 09:30:28 +00:00
|
|
|
SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB, SQLSERVER_2019_STANDARD,
|
|
|
|
|
SQLSERVER_2019_ENTERPRISE, SQLSERVER_2022_EXPRESS, SQLSERVER_2022_WEB,
|
|
|
|
|
SQLSERVER_2022_STANDARD, SQLSERVER_2022_ENTERPRISE.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2022-08-17 09:22:03 +00:00
|
|
|
--[no-]deletion-protection
|
|
|
|
|
Enable deletion protection on a Cloud SQL instance. Use
|
2023-01-19 00:56:33 +00:00
|
|
|
--deletion-protection to enable and --no-deletion-protection to
|
|
|
|
|
disable.
|
2022-08-17 09:22:03 +00:00
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--deny-maintenance-period-end-date=DENY_MAINTENANCE_PERIOD_END_DATE
|
|
|
|
|
Date when the deny maintenance period ends, that is 2021-01-10.
|
|
|
|
|
|
|
|
|
|
--deny-maintenance-period-start-date=DENY_MAINTENANCE_PERIOD_START_DATE
|
|
|
|
|
Date when the deny maintenance period begins, that is 2020-11-01.
|
|
|
|
|
|
|
|
|
|
--deny-maintenance-period-time=DENY_MAINTENANCE_PERIOD_TIME
|
|
|
|
|
Time when the deny maintenance period starts or ends, that is 05:00:00.
|
|
|
|
|
|
2023-07-12 10:20:16 +00:00
|
|
|
--edition=EDITION
|
|
|
|
|
Specifies the edition of Cloud SQL instance. EDITION must be one of:
|
|
|
|
|
enterprise, enterprise-plus.
|
|
|
|
|
|
2025-10-15 10:52:53 +00:00
|
|
|
--enable-auto-upgrade-minor-version
|
|
|
|
|
Enables auto-upgrade for MySQL 8.0 minor versions. The MySQL version
|
|
|
|
|
must be 8.0.35 or higher.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--enable-bin-log
|
|
|
|
|
Allows for data recovery from a specific point in time, down to a
|
|
|
|
|
fraction of a second. Must have automatic backups enabled to use. Make
|
|
|
|
|
sure storage can support at least 7 days of logs.
|
|
|
|
|
|
2025-09-04 11:11:30 +00:00
|
|
|
--[no-]enable-connection-pooling
|
|
|
|
|
Enable connection pooling for the instance. Use
|
|
|
|
|
--enable-connection-pooling to enable and
|
|
|
|
|
--no-enable-connection-pooling to disable.
|
|
|
|
|
|
2024-09-18 09:49:45 +00:00
|
|
|
--[no-]enable-data-cache
|
2023-07-12 10:20:16 +00:00
|
|
|
Enable use of data cache for accelerated read performance. This flag is
|
2024-09-18 09:49:45 +00:00
|
|
|
only available for Enterprise_Plus edition instances. Use
|
|
|
|
|
--enable-data-cache to enable and --no-enable-data-cache to disable.
|
2023-07-12 10:20:16 +00:00
|
|
|
|
2024-07-17 09:30:28 +00:00
|
|
|
--[no-]enable-dataplex-integration
|
|
|
|
|
Enable Dataplex integration for Google Cloud SQL. Use
|
|
|
|
|
--enable-dataplex-integration to enable and
|
|
|
|
|
--no-enable-dataplex-integration to disable.
|
|
|
|
|
|
2024-03-27 09:52:07 +00:00
|
|
|
--[no-]enable-google-ml-integration
|
2025-04-02 10:41:45 +00:00
|
|
|
Enable Vertex AI integration for Google Cloud SQL. You can integrate
|
|
|
|
|
Vertex AI with Cloud SQL for MySQL and Cloud SQL for PostgreSQL
|
|
|
|
|
instances only. Use --enable-google-ml-integration to enable and
|
|
|
|
|
--no-enable-google-ml-integration to disable.
|
2024-03-27 09:52:07 +00:00
|
|
|
|
2023-01-19 00:56:33 +00:00
|
|
|
--enable-google-private-path
|
|
|
|
|
Enable a private path for Google Cloud services. This flag specifies
|
|
|
|
|
whether the instance is accessible to internal Google Cloud services
|
|
|
|
|
such as BigQuery. This is only applicable to MySQL and PostgreSQL
|
|
|
|
|
instances that don't use public IP. Currently, SQL Server isn't
|
|
|
|
|
supported.
|
|
|
|
|
|
2022-05-11 08:44:01 +00:00
|
|
|
--enable-password-policy
|
|
|
|
|
Enable the password policy, which enforces user password management
|
2022-06-08 09:13:38 +00:00
|
|
|
with the policies configured for the instance. This flag is only
|
|
|
|
|
available for Postgres.
|
2022-05-11 08:44:01 +00:00
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--enable-point-in-time-recovery
|
|
|
|
|
Allows for data recovery from a specific point in time, down to a
|
|
|
|
|
fraction of a second, via write-ahead logs. Must have automatic backups
|
|
|
|
|
enabled to use. Make sure storage can support at least 7 days of logs.
|
|
|
|
|
|
2025-09-04 11:11:30 +00:00
|
|
|
--enforce-new-sql-network-architecture
|
|
|
|
|
Force the instance to use the new network architecture.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--failover-replica-name=FAILOVER_REPLICA_NAME
|
|
|
|
|
Also create a failover replica with the specified name.
|
|
|
|
|
|
2025-09-04 11:11:30 +00:00
|
|
|
--[no-]final-backup
|
|
|
|
|
Enables the final backup to be taken at the time of instance deletion.
|
|
|
|
|
Use --final-backup to enable and --no-final-backup to disable.
|
|
|
|
|
|
|
|
|
|
--final-backup-retention-days=FINAL_BACKUP_RETENTION_DAYS
|
|
|
|
|
Specifies number of days to retain final backup. The valid range is
|
|
|
|
|
between 1 and 365. For instances managed by BackupDR, the valid range
|
|
|
|
|
is between 1 day and 99 years. Default value is 30 days.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--[no-]insights-config-query-insights-enabled
|
|
|
|
|
Enable query insights feature to provide query and query plan
|
|
|
|
|
analytics.
|
|
|
|
|
|
|
|
|
|
Use --insights-config-query-insights-enabled to enable and
|
|
|
|
|
--no-insights-config-query-insights-enabled to disable.
|
|
|
|
|
|
|
|
|
|
--insights-config-query-plans-per-minute=INSIGHTS_CONFIG_QUERY_PLANS_PER_MINUTE
|
|
|
|
|
Number of query plans to sample every minute. Default value is 5.
|
|
|
|
|
Allowed range: 0 to 20.
|
|
|
|
|
|
|
|
|
|
--insights-config-query-string-length=INSIGHTS_CONFIG_QUERY_STRING_LENGTH
|
2025-07-30 10:59:26 +00:00
|
|
|
Sets the default query length limit. For Cloud SQL Enterprise edition,
|
|
|
|
|
the range is from 256 to 4500 (in bytes) and the default query length
|
|
|
|
|
is 1024 bytes. For Cloud SQL Enterprise Plus edition, the range is from
|
|
|
|
|
1024 to 100,000 (in bytes) and the default query length is 10,000
|
2022-03-01 04:29:52 +00:00
|
|
|
bytes.
|
|
|
|
|
|
|
|
|
|
--[no-]insights-config-record-application-tags
|
|
|
|
|
Allow application tags to be recorded by the query insights feature.
|
|
|
|
|
|
|
|
|
|
Use --insights-config-record-application-tags to enable and
|
|
|
|
|
--no-insights-config-record-application-tags to disable.
|
|
|
|
|
|
|
|
|
|
--[no-]insights-config-record-client-address
|
|
|
|
|
Allow the client address to be recorded by the query insights feature.
|
|
|
|
|
|
|
|
|
|
Use --insights-config-record-client-address to enable and
|
|
|
|
|
--no-insights-config-record-client-address to disable.
|
|
|
|
|
|
2025-07-30 10:59:26 +00:00
|
|
|
--instance-type=INSTANCE_TYPE
|
|
|
|
|
The type of the instance. INSTANCE_TYPE must be one of:
|
|
|
|
|
|
|
|
|
|
CLOUD_SQL_INSTANCE
|
|
|
|
|
A primary instance.
|
|
|
|
|
READ_POOL_INSTANCE
|
|
|
|
|
A read pool instance.
|
|
|
|
|
READ_REPLICA_INSTANCE
|
|
|
|
|
A read replica instance.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--maintenance-release-channel=MAINTENANCE_RELEASE_CHANNEL
|
|
|
|
|
Which channel's updates to apply during the maintenance window. If not
|
|
|
|
|
specified, Cloud SQL chooses the timing of updates to your instance.
|
|
|
|
|
MAINTENANCE_RELEASE_CHANNEL must be one of:
|
|
|
|
|
|
|
|
|
|
preview
|
|
|
|
|
Preview updates release prior to production updates. You may wish
|
|
|
|
|
to use the preview channel for dev/test applications so that you
|
|
|
|
|
can preview their compatibility with your application prior to the
|
|
|
|
|
production release.
|
|
|
|
|
production
|
|
|
|
|
Production updates are stable and recommended for applications in
|
|
|
|
|
production.
|
2023-11-15 11:42:54 +00:00
|
|
|
week5
|
|
|
|
|
week5 updates release after the production updates. Use the week5
|
|
|
|
|
channel to receive a 5 week advance notification about the upcoming
|
|
|
|
|
maintenance, so you can prepare your application for the release.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--maintenance-window-day=MAINTENANCE_WINDOW_DAY
|
|
|
|
|
Day of week for maintenance window, in UTC time zone.
|
|
|
|
|
MAINTENANCE_WINDOW_DAY must be one of: SUN, MON, TUE, WED, THU, FRI,
|
|
|
|
|
SAT.
|
|
|
|
|
|
|
|
|
|
--maintenance-window-hour=MAINTENANCE_WINDOW_HOUR
|
|
|
|
|
Hour of day for maintenance window, in UTC time zone.
|
|
|
|
|
|
|
|
|
|
--master-instance-name=MASTER_INSTANCE_NAME
|
|
|
|
|
Name of the instance which will act as master in the replication setup.
|
|
|
|
|
The newly created instance will be a read replica of the specified
|
|
|
|
|
master instance.
|
|
|
|
|
|
|
|
|
|
--memory=MEMORY
|
|
|
|
|
Whole number value indicating how much memory is desired in the
|
|
|
|
|
machine. A size unit should be provided (eg. 3072MiB or 9GiB) - if no
|
|
|
|
|
units are specified, GiB is assumed. Both --cpu and --memory must be
|
|
|
|
|
specified if a custom machine type is desired, and the --tier flag must
|
2025-06-14 05:31:37 +00:00
|
|
|
be omitted. --cpu and --memory flags are not compatible with the
|
|
|
|
|
Enterprise Plus edition. These flags should not be used when creating
|
|
|
|
|
an Enterprise Plus edition, as the machine configuration is determined
|
|
|
|
|
by the --tier flag instead.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--network=NETWORK
|
|
|
|
|
Network in the current project that the instance will be part of. To
|
|
|
|
|
specify using a network with a shared VPC, use the full URL of the
|
|
|
|
|
network. For an example host project, 'testproject', and shared
|
|
|
|
|
network, 'testsharednetwork', this would use the form:
|
|
|
|
|
--network=projects/testproject/global/networks/testsharednetwork
|
|
|
|
|
|
2025-07-30 10:59:26 +00:00
|
|
|
--node-count=NODE_COUNT
|
|
|
|
|
The number of nodes in the pool. This option is only available for read
|
|
|
|
|
pools.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--password-policy-complexity=PASSWORD_POLICY_COMPLEXITY
|
2022-06-08 09:13:38 +00:00
|
|
|
The complexity of the password. This flag is available only for
|
|
|
|
|
PostgreSQL. PASSWORD_POLICY_COMPLEXITY must be one of:
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
COMPLEXITY_DEFAULT
|
|
|
|
|
A combination of lowercase, uppercase, numeric, and
|
|
|
|
|
non-alphanumeric characters.
|
|
|
|
|
COMPLEXITY_UNSPECIFIED
|
|
|
|
|
The default value if COMPLEXITY_DEFAULT is not specified. It
|
|
|
|
|
implies that complexity check is not enabled.
|
|
|
|
|
|
|
|
|
|
--[no-]password-policy-disallow-username-substring
|
2022-07-13 09:59:38 +00:00
|
|
|
Disallow username as a part of the password. Use
|
|
|
|
|
--password-policy-disallow-username-substring to enable and
|
|
|
|
|
--no-password-policy-disallow-username-substring to disable.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--password-policy-min-length=PASSWORD_POLICY_MIN_LENGTH
|
2022-07-13 09:59:38 +00:00
|
|
|
Minimum number of characters allowed in the password.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--password-policy-password-change-interval=PASSWORD_POLICY_PASSWORD_CHANGE_INTERVAL
|
|
|
|
|
Minimum interval after which the password can be changed, for example,
|
|
|
|
|
2m for 2 minutes. See <a href="/sdk/gcloud/reference/topic/datetimes">
|
2022-06-08 09:13:38 +00:00
|
|
|
$ gcloud topic datetimes</a> for information on duration formats. This
|
|
|
|
|
flag is available only for PostgreSQL.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--password-policy-reuse-interval=PASSWORD_POLICY_REUSE_INTERVAL
|
|
|
|
|
Number of previous passwords that cannot be reused. The valid range is
|
2022-07-13 09:59:38 +00:00
|
|
|
0 to 100.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2024-10-16 09:53:35 +00:00
|
|
|
--psc-auto-connections=[network=NETWORK],[project=PROJECT]
|
2025-09-17 11:04:06 +00:00
|
|
|
A comma-separated list of networks or network-project pairs. Each
|
|
|
|
|
project is represented by a project number (numeric) or by a project ID
|
|
|
|
|
(alphanumeric). This allows Private Service Connect connections to be
|
|
|
|
|
created automatically for the specified networks. For example, this
|
|
|
|
|
connection uses "the form
|
2024-10-16 09:53:35 +00:00
|
|
|
psc-auto-connections=network=projects/testproject1/global/networks/testnetwork1"
|
|
|
|
|
or "the form
|
|
|
|
|
psc-auto-connections=project=testproject1,network=projects/testproject1/global/networks/testnetwork1".
|
|
|
|
|
Sets psc_auto_connections value.
|
|
|
|
|
|
|
|
|
|
network
|
2025-05-14 10:45:02 +00:00
|
|
|
Required, sets network value.
|
2024-10-16 09:53:35 +00:00
|
|
|
|
|
|
|
|
project
|
|
|
|
|
Sets project value.
|
|
|
|
|
|
|
|
|
|
Shorthand Example:
|
|
|
|
|
|
|
|
|
|
--psc-auto-connections=network=string,project=string
|
|
|
|
|
|
|
|
|
|
JSON Example:
|
|
|
|
|
|
|
|
|
|
--psc-auto-connections='{"network": "string", "project": "string"}'
|
|
|
|
|
|
|
|
|
|
File Example:
|
|
|
|
|
|
|
|
|
|
--psc-auto-connections=path_to_file.(yaml|json)
|
|
|
|
|
|
2023-07-20 11:47:25 +00:00
|
|
|
--[no-]recreate-replicas-on-primary-crash
|
|
|
|
|
Allow/Disallow replica recreation when a primary MySQL instance
|
|
|
|
|
operating in reduced durability mode crashes. Not recreating the
|
|
|
|
|
replicas might lead to data inconsistencies between the primary and its
|
|
|
|
|
replicas. This setting is only applicable for MySQL instances and is
|
|
|
|
|
enabled by default. Use --recreate-replicas-on-primary-crash to enable
|
|
|
|
|
and --no-recreate-replicas-on-primary-crash to disable.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--replica-type=REPLICA_TYPE
|
|
|
|
|
The type of replica to create. REPLICA_TYPE must be one of: READ,
|
|
|
|
|
FAILOVER.
|
|
|
|
|
|
|
|
|
|
--replication=REPLICATION
|
|
|
|
|
Type of replication this instance uses. The default is synchronous.
|
|
|
|
|
REPLICATION must be one of: synchronous, asynchronous.
|
|
|
|
|
|
|
|
|
|
--require-ssl
|
|
|
|
|
Specified if users connecting over IP must use SSL.
|
|
|
|
|
|
2025-03-19 10:42:21 +00:00
|
|
|
--[no-]retain-backups-on-delete
|
|
|
|
|
Retain automated/ondemand backups of the instance after the instance is
|
|
|
|
|
deleted. Use --retain-backups-on-delete to enable and
|
|
|
|
|
--no-retain-backups-on-delete to disable.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--retained-backups-count=RETAINED_BACKUPS_COUNT
|
2023-07-12 10:20:16 +00:00
|
|
|
How many backups to keep. The valid range is between 1 and 365. Default
|
2023-08-16 10:49:45 +00:00
|
|
|
value is 7 for Enterprise edition instances. For Enterprise_Plus,
|
|
|
|
|
default value is 15. Applicable only if --no-backups is not specified.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--retained-transaction-log-days=RETAINED_TRANSACTION_LOG_DAYS
|
|
|
|
|
How many days of transaction logs to keep. The valid range is between 1
|
2023-07-12 10:20:16 +00:00
|
|
|
and 35. Only use this option when point-in-time recovery is enabled. If
|
|
|
|
|
logs are stored on disk, storage size for transaction logs could
|
|
|
|
|
increase when the number of days for log retention increases. For
|
|
|
|
|
Enterprise, default and max retention values are 7 and 7 respectively.
|
2023-08-16 10:49:45 +00:00
|
|
|
For Enterprise_Plus, default and max retention values are 14 and 35.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--root-password=ROOT_PASSWORD
|
|
|
|
|
Root Cloud SQL user's password.
|
|
|
|
|
|
2024-12-11 10:18:23 +00:00
|
|
|
--server-ca-mode=SERVER_CA_MODE
|
|
|
|
|
Set the server CA mode of the instance. SERVER_CA_MODE must be one of:
|
|
|
|
|
|
|
|
|
|
CUSTOMER_MANAGED_CAS_CA
|
|
|
|
|
Customer-managed CA hosted on Google Cloud's Certificate Authority
|
|
|
|
|
Service (CAS).
|
|
|
|
|
GOOGLE_MANAGED_CAS_CA
|
|
|
|
|
Google-managed regional CA part of root CA hierarchy hosted on
|
|
|
|
|
Google Cloud's Certificate Authority Service (CAS).
|
|
|
|
|
GOOGLE_MANAGED_INTERNAL_CA
|
|
|
|
|
Google-managed self-signed internal CA.
|
|
|
|
|
|
2025-03-19 10:42:21 +00:00
|
|
|
--server-ca-pool=SERVER_CA_POOL
|
|
|
|
|
Set the server CA pool of the instance.
|
|
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--server-certificate-rotation-mode=SERVER_CERTIFICATE_ROTATION_MODE
|
|
|
|
|
Set the server certificate rotation mode of the instance.
|
|
|
|
|
SERVER_CERTIFICATE_ROTATION_MODE must be one of:
|
|
|
|
|
|
|
|
|
|
AUTOMATIC_ROTATION_DURING_MAINTENANCE
|
|
|
|
|
Automatic server certificate rotation during Cloud SQL scheduled
|
|
|
|
|
maintenance or self-service maintenance updates. Requires
|
|
|
|
|
server_ca_mode to be GOOGLE_MANAGED_CAS_CA or
|
|
|
|
|
CUSTOMER_MANAGED_CAS_CA.
|
|
|
|
|
NO_AUTOMATIC_ROTATION
|
|
|
|
|
No automatic server certificate rotation. Server certificates must
|
|
|
|
|
be rotated manually.
|
|
|
|
|
|
2023-10-25 11:42:23 +00:00
|
|
|
--ssl-mode=SSL_MODE
|
|
|
|
|
Set the SSL mode of the instance. SSL_MODE must be one of:
|
|
|
|
|
|
|
|
|
|
ALLOW_UNENCRYPTED_AND_ENCRYPTED
|
|
|
|
|
Allow non-SSL and SSL connections. For SSL connections, client
|
|
|
|
|
certificate will not be verified.
|
|
|
|
|
ENCRYPTED_ONLY
|
|
|
|
|
Only allow connections encrypted with SSL/TLS.
|
|
|
|
|
TRUSTED_CLIENT_CERTIFICATE_REQUIRED
|
|
|
|
|
Only allow connections encrypted with SSL/TLS and with valid client
|
|
|
|
|
certificates.
|
|
|
|
|
|
2022-07-20 08:59:31 +00:00
|
|
|
--[no-]storage-auto-increase
|
2022-03-01 04:29:52 +00:00
|
|
|
Storage size can be increased, but it cannot be decreased; storage
|
|
|
|
|
increases are permanent for the life of the instance. With this setting
|
|
|
|
|
enabled, a spike in storage requirements can result in permanently
|
|
|
|
|
increased storage costs for your instance. However, if an instance runs
|
|
|
|
|
out of available space, it can result in the instance going offline,
|
2022-07-20 08:59:31 +00:00
|
|
|
dropping existing connections. This setting is enabled by default. Use
|
|
|
|
|
--storage-auto-increase to enable and --no-storage-auto-increase to
|
|
|
|
|
disable.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2025-03-19 10:42:21 +00:00
|
|
|
--storage-provisioned-iops=STORAGE_PROVISIONED_IOPS
|
|
|
|
|
Indicates how many IOPS to provision for the data disk. This sets the
|
|
|
|
|
number of I/O operations per second that the disk can handle.
|
|
|
|
|
|
|
|
|
|
--storage-provisioned-throughput=STORAGE_PROVISIONED_THROUGHPUT
|
|
|
|
|
Indicates how much throughput to provision for the data disk. This sets
|
|
|
|
|
the throughput in MB per second that the disk can handle.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--storage-size=STORAGE_SIZE
|
|
|
|
|
Amount of storage allocated to the instance. Must be an integer number
|
|
|
|
|
of GB. The default is 10GB. Information on storage limits can be found
|
|
|
|
|
here: https://cloud.google.com/sql/docs/quotas#storage_limits
|
|
|
|
|
|
|
|
|
|
--storage-type=STORAGE_TYPE
|
2025-11-18 10:53:36 +00:00
|
|
|
The storage type for the instance, determined by the selected machine
|
|
|
|
|
type. STORAGE_TYPE must be one of: SSD, HDD, HYPERDISK_BALANCED.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2025-02-20 10:40:27 +00:00
|
|
|
--tags=TAG=VALUE,[TAG=VALUE,...]
|
|
|
|
|
Comma-separated list of tags to set on the instance. Use an equals
|
|
|
|
|
signto separate tag name and value.(e.g., --tags
|
|
|
|
|
tag1:value1,tag2=value2)
|
|
|
|
|
|
2023-05-04 10:43:54 +00:00
|
|
|
--threads-per-core=THREADS_PER_CORE
|
|
|
|
|
The number of threads per core. The value of this flag can be 1 or 2.
|
|
|
|
|
To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL
|
|
|
|
|
Server instances.
|
|
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
--tier=TIER, -t TIER
|
|
|
|
|
Machine type for a shared-core instance e.g. db-g1-small. For all other
|
|
|
|
|
instances, instead of using tiers, customize your instance by
|
|
|
|
|
specifying its CPU and memory. You can do so with the --cpu and
|
|
|
|
|
--memory flags. Learn more about how CPU and memory affects pricing:
|
|
|
|
|
https://cloud.google.com/sql/pricing.
|
|
|
|
|
|
2022-10-05 10:40:53 +00:00
|
|
|
--time-zone=TIME_ZONE
|
|
|
|
|
Set a non-default time zone. Only available for SQL Server instances.
|
|
|
|
|
|
2023-01-19 00:56:33 +00:00
|
|
|
--timeout=TIMEOUT; default=3600
|
|
|
|
|
Time to synchronously wait for the operation to complete, after which
|
|
|
|
|
the operation continues asynchronously. Ignored if --async flag is
|
|
|
|
|
specified. By default, set to 3600s. To wait indefinitely, set to
|
|
|
|
|
unlimited.
|
|
|
|
|
|
2023-08-09 11:23:49 +00:00
|
|
|
--allowed-psc-projects=PROJECT,[PROJECT,...]
|
2023-09-27 12:05:40 +00:00
|
|
|
A comma-separated list of projects. Each project in this list might be
|
|
|
|
|
represented by a project number (numeric) or by a project ID
|
|
|
|
|
(alphanumeric). This allows Private Service Connect connections to be
|
|
|
|
|
established from specified consumer projects.
|
2023-08-09 11:23:49 +00:00
|
|
|
|
|
|
|
|
--enable-private-service-connect
|
2024-11-20 10:03:22 +00:00
|
|
|
Enable connecting to the Cloud SQL instance with Private Service
|
|
|
|
|
Connect.
|
2023-08-09 11:23:49 +00:00
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
Key resource - The Cloud KMS (Key Management Service) cryptokey that will
|
|
|
|
|
be used to protect the instance. The 'Compute Engine Service Agent'
|
|
|
|
|
service account must hold permission 'Cloud KMS CryptoKey
|
|
|
|
|
Encrypter/Decrypter'. The arguments in this group can be used to specify
|
|
|
|
|
the attributes of this resource.
|
|
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--disk-encryption-key=DISK_ENCRYPTION_KEY
|
|
|
|
|
ID of the key or fully qualified identifier for the key.
|
2023-05-04 10:43:54 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
To set the kms-key attribute:
|
|
|
|
|
◆ provide the argument --disk-encryption-key on the command line.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--disk-encryption-key-keyring=DISK_ENCRYPTION_KEY_KEYRING
|
|
|
|
|
The KMS keyring of the key.
|
2023-05-04 10:43:54 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
To set the kms-keyring attribute:
|
|
|
|
|
◆ provide the argument --disk-encryption-key on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
◆ provide the argument --disk-encryption-key-keyring on the command
|
|
|
|
|
line.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--disk-encryption-key-location=DISK_ENCRYPTION_KEY_LOCATION
|
|
|
|
|
The Google Cloud location for the key.
|
2023-05-04 10:43:54 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
To set the kms-location attribute:
|
|
|
|
|
◆ provide the argument --disk-encryption-key on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
◆ provide the argument --disk-encryption-key-location on the command
|
|
|
|
|
line.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--disk-encryption-key-project=DISK_ENCRYPTION_KEY_PROJECT
|
|
|
|
|
The Google Cloud project for the key.
|
2023-05-04 10:43:54 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
To set the kms-project attribute:
|
|
|
|
|
◆ provide the argument --disk-encryption-key on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
◆ provide the argument --disk-encryption-key-project on the command
|
|
|
|
|
line;
|
|
|
|
|
◆ set the property core/project.
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2025-10-23 11:05:02 +00:00
|
|
|
Options for configuring read pool auto scale.
|
|
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--[no-]auto-scale-disable-scale-in
|
|
|
|
|
Disables automatic read pool scale-in. When disabled, read pool auto
|
|
|
|
|
scaling only supports increasing the read pool node count. By default,
|
|
|
|
|
both automatic read pool scale-in and scale-out are enabled. Use
|
|
|
|
|
--auto-scale-disable-scale-in to enable and
|
|
|
|
|
--no-auto-scale-disable-scale-in to disable.
|
|
|
|
|
|
|
|
|
|
--[no-]auto-scale-enabled
|
|
|
|
|
Enables read pool auto scaling. Supports automatically increasing and
|
|
|
|
|
decreasing the read pool's node count based on need. Use
|
|
|
|
|
--auto-scale-enabled to enable and --no-auto-scale-enabled to disable.
|
|
|
|
|
|
|
|
|
|
--auto-scale-in-cooldown-seconds=AUTO_SCALE_IN_COOLDOWN_SECONDS
|
|
|
|
|
The cooldown period for automatic read pool scale-in. Minimum time
|
|
|
|
|
between scale-in events. Must be an integer value. For example, if the
|
|
|
|
|
value is 60, then a scale-in event will not be triggered within 60
|
|
|
|
|
seconds of the last scale-in event.
|
|
|
|
|
|
|
|
|
|
--auto-scale-max-node-count=AUTO_SCALE_MAX_NODE_COUNT
|
|
|
|
|
Maximum number of read pool nodes to be maintained.
|
|
|
|
|
|
|
|
|
|
--auto-scale-min-node-count=AUTO_SCALE_MIN_NODE_COUNT
|
|
|
|
|
Minimum number of read pool nodes to be maintained.
|
|
|
|
|
|
|
|
|
|
--auto-scale-out-cooldown-seconds=AUTO_SCALE_OUT_COOLDOWN_SECONDS
|
|
|
|
|
The cooldown period for automatic read pool scale-out. Minimum time
|
|
|
|
|
between scale-out events. Must be an integer value. For example, if the
|
|
|
|
|
value is 60, then a scale-out event will not be triggered within 60
|
|
|
|
|
seconds of the last scale-out event.
|
|
|
|
|
|
|
|
|
|
--auto-scale-target-metrics=[METRIC=VALUE,...]
|
|
|
|
|
Target metrics for read pool auto scaling. Options are:
|
|
|
|
|
AVERAGE_CPU_UTILIZATION and AVERAGE_DB_CONNECTIONS. Example:
|
|
|
|
|
--auto-scale-target-metrics=AVERAGE_CPU_UTILIZATION=0.8
|
2025-10-23 11:05:02 +00:00
|
|
|
|
2022-03-01 04:29:52 +00:00
|
|
|
At most one of these can be specified:
|
|
|
|
|
|
|
|
|
|
--region=REGION; default="us-central"
|
|
|
|
|
Regional location (e.g. asia-east1, us-east1). See the full list of
|
|
|
|
|
regions at https://cloud.google.com/sql/docs/instance-locations.
|
|
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
Or at most one of these can be specified:
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
--gce-zone=GCE_ZONE
|
|
|
|
|
(DEPRECATED) Preferred Compute Engine zone (e.g. us-central1-a,
|
|
|
|
|
us-central1-b, etc.).
|
|
|
|
|
|
|
|
|
|
Flag --gce-zone is deprecated and will be removed by release
|
|
|
|
|
255.0.0. Use --zone instead.
|
|
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
Or at least one of these can be specified:
|
|
|
|
|
|
|
|
|
|
--secondary-zone=SECONDARY_ZONE
|
|
|
|
|
Preferred secondary Compute Engine zone (e.g. us-central1-a,
|
|
|
|
|
us-central1-b, etc.).
|
2022-03-01 04:29:52 +00:00
|
|
|
|
2026-02-11 11:28:25 +00:00
|
|
|
--zone=ZONE
|
|
|
|
|
Preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
|
|
|
|
|
etc.).
|
2022-03-01 04:29:52 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
These variants are also available:
|
|
|
|
|
|
|
|
|
|
$ gcloud alpha sql instances create
|
|
|
|
|
|
|
|
|
|
$ gcloud beta sql instances create
|
|
|
|
|
|