Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramiyengar/cfe0c9c3492c74e2fbcfc61b73041cda to your computer and use it in GitHub Desktop.
Save ramiyengar/cfe0c9c3492c74e2fbcfc61b73041cda to your computer and use it in GitHub Desktop.
# Copyright 2018 the Service Broker Project Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
version: 1
name: csb-azure-postgresql
id: ef89bc54-299a-4384-9dd6-4ea0cca11700
description: Azure Database for PostgreSQL
display_name: Azure Database for PostgreSQL
image_url: https://d1.awsstatic.com/rdsImages/postgresql_logo.6de4615badd99412268bc6aa8fc958a0f403dd41.png
documentation_url: https://azure.microsoft.com/en-us/services/postgresql/
support_url: https://azure.microsoft.com/en-us/services/postgresql/
tags: [azure, postgresql, postgres, preview]
plan_updateable: true
plans:
- name: small
id: aa1cf0f0-79fe-4132-a112-859fef9bf7cc
description: 'PostgreSQL 11, minumum 2 cores, minumum 4GB ram, 5GB storage'
display_name: "small"
properties:
- name: medium
id: d83c74b9-0bb9-409e-bd26-8424ea908462
description: 'PostgreSQL 11, minumum 4 cores, minumum 8GB ram, 10GB storage'
display_name: "medium"
properties:
cores: 4
storage_gb: 10
- name: large
id: 945b0ca1-5b5e-49b0-884a-20809103907e
description: 'PostgreSQL 11, minumum 8 cores, minumum 16GB ram, 20GB storage'
display_name: "large"
properties:
cores: 8
storage_gb: 20
provision:
plan_inputs:
user_inputs:
- field_name: cores
type: integer
details: Minimum number of cores for service instance.
default: 2
constraints:
maximum: 64
minimum: 1
multipleOf: 2
- field_name: postgres_version
type: string
details: The version for the PostgreSQL instance.
default: "11"
enum:
"9.5": PostgreSQL 9.5
"9.6": PostgreSQL 9.6
"10": PostgreSQL 10
"11": PostgreSQL 11
- field_name: storage_gb
type: number
details: Size of storage volume for service instance.
default: 5
constraints:
maximum: 4096
minumum: 5
- field_name: use_tls
type: boolean
details: Use TLS for connection
default: true
- field_name: instance_name
type: string
details: Name for your PostgreSQL instance
default: csb-postgresql-${request.instance_id}
constraints:
maxLength: 98
minLength: 6
pattern: ^[a-z][a-z0-9-]+$
prohibit_update: true
- field_name: resource_group
details: Name for the resource group for this instance
default: ''
constraints:
maxLength: 64
minLength: 0
pattern: ^[a-z][a-z0-9-]+$|^$
prohibit_update: true
- field_name: db_name
type: string
details: Name for your database
default: vsbdb
constraints:
maxLength: 64
- field_name: authorized_network
type: string
details: The subnet ID of the Azure VNET to which the instance is locked down to. If left unspecified,
default: default
- field_name: location
type: string
details: The location of the mysql instance.
default: westus
enum:
eastasia: East Asia
southeastasia: South East Asia
centralus: Central US
eastus: East US
eastus2: East US 2
westus: West US
northcentralus: North Central US
southcentralus: South Central US
northeurope: North Europe
westeurope: West Europe
japanwest: Japan West
japaneast: Japan East
brazilsouth: Brazil South
australiaeast: Australia East
australiasoutheast: Australia South East
australiacentral: Australia Central
australiacentral2: Australia Central 2
southindia: South India
centralindia: Central India
westindia: West India
canadacentral: Canada Central
canadaeast: Canada East
uksouth: UK South
ukwest: UK West
westcentralus: West Central US
westus2: West US 2
koreacentral: Korea Central
koreasouth: Korea South
francecentral: France Central
uaenorth: UAE North
southafricanorth: South Africa North
southafricawest: South Africa West
germanycentral: Germany Central
prohibit_update: true
- field_name: azure_tenant_id
type: string
details: Azure Tenant to create resource in
default: ${config("azure.tenant_id")}
- field_name: azure_subscription_id
type: string
details: Azure Subscription to create resource in
default: ${config("azure.subscription_id")}
- field_name: azure_client_id
type: string
details: Client ID of Azure principal
default: ${config("azure.client_id")}
- field_name: azure_client_secret
type: string
details: Client secret for Azure principal
default: ${config("azure.client_secret")}
- field_name: skip_provider_registration
type: boolean
details: Skip automatic Azure provider registration, set to true if service principal being used does not have rights to register providers
default: false
- field_name: sku_name
type: string
details: Azure sku (typically, tier [B,GP,MO] + family [Gen4,Gen5] + cores, e.g. B_Gen4_1, GP_Gen5_8, see https://docs.microsoft.com/en-us/azure/mysql/concepts-pricing-tiers) Will be computed from cores if empty.
default: ""
computed_inputs:
- name: labels
default: ${json.marshal(request.default_labels)}
overwrite: true
type: object
template_ref: terraform/azure-postgres/postgres-provision.tf
outputs:
- field_name: name
type: string
details: The name of the database.
- field_name: hostname
type: string
details: Hostname or IP address of the exposed PostgreSQL endpoint used by clients to connect to the service.
- field_name: port
type: integer
details: The port number of the exposed PostgreSQL instance.
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: use_tls
type: boolean
details: Using TLS for connection
bind:
plan_inputs: []
user_inputs: []
computed_inputs:
- name: db_name
type: string
default: ${instance.details["name"]}
overwrite: true
- name: hostname
type: string
default: ${instance.details["hostname"]}
overwrite: true
- name: port
type: integer
default: ${instance.details["port"]}
overwrite: true
- name: admin_username
type: string
default: ${instance.details["username"]}
overwrite: true
- name: admin_password
type: string
default: ${instance.details["password"]}
overwrite: true
- name: use_tls
type: boolean
default: ${instance.details["use_tls"]}
overwrite: true
template_ref: terraform/azure-postgres/postgresql-bind.tf
outputs:
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: uri
type: string
details: The uri to connect to the database instance and database.
- field_name: jdbcUrl
type: string
details: The jdbc url to connect to the database instance and database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment