Диспетчер развертывания поддерживает PostgreSQL.
Вам необходимо указать backendType
как SECOND_GEN
, databaseVersion
как POSTGRES_9_6
и tier
как db-custom-1-3840
.
Документация
Пример (create-postgresql-instance.jinja):
{% set deployment_name = env['deployment'] %}
{% set instance_name = deployment_name + '-instance' %}
{% set database_name = deployment_name + '-db' %}
{% set region = 'us-central1' %}
{% set tier = 'db-custom-1-3840' %}
resources:
- name: {{ instance_name }}
type: gcp-types/sqladmin-v1beta4:instances
properties:
region: {{ region }}
backendType: SECOND_GEN
databaseVersion: POSTGRES_9_6
settings:
tier: {{ tier }}
backupConfiguration:
enabled: true
- name: {{ database_name }}
type: gcp-types/sqladmin-v1beta4:databases
properties:
name: {{ database_name }}
instance: $(ref.{{ instance_name }}.name)
charset: utf8
Развертывание:
gcloud deployment-manager deployments create mydb --template create-postgresql-instance.jinja