0.1.14 • Published 1 year ago

@azbake/ingredient-postgresql v0.1.14

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Changelogs

Overview

The PostgreSQL ingredient is a plugin for bake. When included in a recipe, this will create an Azure Database for PostgreSQL server. This only creates the server resource and admin account. Individual applications are responsible for creating and maintaining Containers / Databases / Collections.

Currently this is only able to create a Flexible server. Azure is pushing users away from Single server, but if this is needed, the plugin can be enhanced with a new template based on this.

Usage

name: mypostgresdb
shortName: mypgsql
version: 1.0.0
ingredients:
   - "@azbake/ingredient-postgresql@0.*"
resourceGroup: true
variables:
  dbServerName: "[postgresqldbutils.create_resource_name()]"
  adminLogin: "testadmin"
  adminPass: "dontusethis"
recipe:
  mypostgres-db:
    properties:
      type: "@azbake/ingredient-postgresql"
      parameters:
        administratorLogin: "[coreutils.variable('adminLogin')]"
        administratorLoginPassword: "[coreutils.variable('adminPass')]"
        location: "[coreutils.current_region().name]"
        serverName: "[coreutils.variable('dbServerName')]"
        access: "private" 
        serverEdition: "Burstable" 
        storageSizeGB: 32 
        dbInstanceType: "Standard_B1ms"
        haMode: "Disabled"
        availabilityZone: ""
        version: "13"
        firewallRules:
          rules:
            - name: "testrule"
              startIPAddress: "192.168.0.0"
              endIPAddress: "192.168.0.1"
        backupRetentionDays: 14
        geoRedundantBackup: "Disabled"
        virtualNetworkExternalId: "" 
        subnetName: "pgsql"
        virtualNetworkName: "YOUR_VNET_HERE"
        virtualNetworkResourceGroup: "SOME_RG"
propertyrequireddescription
administratorLoginyesThe username for the server admin
administratorLoginPasswordyesAdmin password
serverNameYesServer name
accessYes"public" or "private"
locationNoRegion name. ex [coreutils.current_region().name] or eastus
serverEditionNoex Burstable or GeneralPurpose
storageSizeGBNoMinimum 32 GB. Billed at $0.115/GB/mo
dbInstanceTypeNoVM size. ex Standard_B1ms
haModeNoHigh Availability mode. ex Disabled or ZoneRedundant
availabilityZoneNoPreferred availability zone. ex 1 or 2
versionNoPostgres version ex 12 or 13
firewallRulesNoa "rules" object with an array of rules. By default, no public IP addresses are allowed.
backupRetentionDaysNoDefault 14
geoRedundantBackupNoDefault Disabled
virtualNetworkExternalIdNoFor public access servers only. Default empty string, which is treated as "Enabled".
subnetNameYes, for private accessFor private access servers only. The name of an existing subnet that's empty or already delegated to PostgreSQL. Must be a subnet of virtualNetworkName
virtualNetworkNameYes, for private accessFor private access servers only. The name of an existing virtual network with subnet subnetName
virtualNetworkResourceGroupYes, for private accessFor private access servers only. RG of Vnet. Assuming this is in the same subscription that everything else in the deployment belongs to.

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

postgresqldbutils class

functiondescription
create_resource_name()Returns the name created for the resource when deployed

Function Details

create_resource_name()

Gets the name created for the resource when deployed.

...
parameters:
    name: "[postgresqldbutils.create_resource_name()]"
...
Returns

string

0.1.14

1 year ago

0.1.12

1 year ago

0.1.13

1 year ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago