Blitzm Cloud - azure-postgres-flexible
@blitzm/azure-postgres-flexible is a pulumi component that simplifies the deployment of Azure PostgresSql flexible server in azure
Installation
This package can be installed using npm
npm install --save --save-exact @blitzm/azure-postgres-flexible
Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import { AzurePostgresSqlFlexible } from "@blitzm/azure-postgres-flexible";
const resourceGroup = new azure.core.ResourceGroup("sample-rc");
const vNet = new azure.network.VirtualNetwork('vnet', {
name: 'vnet',
resourceGroupName: resourceGroup.name,
addressSpaces: [ '10.13.0.0/16' ]
});
const logAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace(
"db-log-analytics",
{
resourceGroupName: resourceGroup.name,
name: "db-test-analytic",
retentionInDays: 180,
}
);
const db = new AzurePostgresSqlFlexible("sample-db", {
resourceGroup: resourceGroup,
skuName: "B_Standard_B2s",
storageSizeGB: 64,
version: "14",
backupRetentionDays: 7,
geoRedundantBackupEnabled: false,
database: {
name: "sample",
},
zone: "3",
vNet: vNet,
diagnosticSetting: {
name: "test-diag",
enabledLogs: [
{ category: "PostgreSQLLogs" },
{ category: "PostgreSQLFlexSessions" },
{ category: "PostgreSQLFlexQueryStoreRuntime" },
{ category: "PostgreSQLFlexQueryStoreWaitStats" },
{ category: "PostgreSQLFlexTableStats" },
{ category: "PostgreSQLFlexDatabaseXacts" },
],
metrics: [
{
category: "AllMetrics",
enabled: true,
},
],
logAnalyticsWorkspaceId: logAnalyticsWorkspace.id,
},
});
export const dbDetails = db;
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Blitzm