我创建了一个实例,并成功地与公共外部IP连接。我想知道是否有一种方法来分配授权网络的域名而不是IP地址?我希望使用没有IP的域名,因为公共IP将在路由器重新启动后更改.这很麻烦,因为如果我的公共IP有变化,我需要更改授权的网络。
发布于 2014-03-14 08:12:16
目前,无法使用名称代替IP。注意,Cloud 1允许更新授权网络的列表。Cloud 2中的gcloud命令行工具对此提供了支持。
$ gcloud sql instances patch -h
usage: gcloud sql instances patch
[optional flags] INSTANCE
Updates the settings of a Cloud SQL instance.
optional flags:
[...]
--authorized-networks AUTHORIZED_NETWORKS
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).
[...]
positional arguments:
INSTANCE Cloud SQL instance ID.https://stackoverflow.com/questions/22395282
复制相似问题