user3418206
user3418206

Reputation: 3

Google mysql cloud Instance Authorized Network with domain name

I created an instance and i connected successfully with a public external IP. I wish to know is there a way to assign authorized network with domain name instead of an IP address? I wish to use domain name with no-ip as public IP will changed after router restarted. This makes troublesome because i need to change the authorized network if there is changes in my public IP.

Upvotes: 0

Views: 607

Answers (1)

Razvan Musaloiu-E.
Razvan Musaloiu-E.

Reputation: 1320

Currently there is no way to use a name instead of an IP. Note that Cloud SQL API [1] allows updating the list of authorized networks. The gcloud command line tool from Cloud SDK [2] has support for that.

$ 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.

[1] https://developers.google.com/cloud-sql/docs/admin-api/v1beta3/instances
[2] https://developers.google.com/cloud-sql/docs/cloud-sdk

Upvotes: 1

Related Questions