0
votes

I see that the POSTGRES database option for gce sql is still in BETA, just looking for confermation that the issue mentioned below is an issue with the API and not something stupid I've overlooked.

    gcloud sql instances create example-db --activation-policy=ALWAYS --tier="db-n1-standard-1" --pricing-plan="PER_USE" --region="asia-east1" --gce-zone="asia-east1-a" --database-version=POSTGRES_9_6

HTTPError 400: Invalid value for: POSTGRES_9_6 is not a valid value

Documentation says that this is a valid option: - https://cloud.google.com/sdk/gcloud/reference/sql/instances/create

1

1 Answers

3
votes

Found more documentation that explains I needed to use the gcloud beta command syntax.

https://cloud.google.com/sql/docs/postgres/create-instance

Actual Working Example

gcloud beta sql instances create example-db --activation-policy=ALWAYS --pricing-plan="PER_USE" --region="asia-east1" --gce-zone="asia-east1-a" --cpu=2 --memory=3840MiB --database-version="POSTGRES_9_6"