/
index.ts
35 lines (31 loc) · 1.08 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2023, Pulumi Corporation. All rights reserved.
import * as postgresql from "@pulumi/azure-native/dbforpostgresql";
import * as resources from "@pulumi/azure-native/resources";
const resourceGroup = new resources.ResourceGroup("rg", {
// westus2 was not available for Postgres Flexible Server at the time of writing, see
// https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/overview#azure-regions
location: "uksouth",
});
const flexibleServer = new postgresql.Server("server", {
location: resourceGroup.location,
resourceGroupName: resourceGroup.name,
sku: {
tier: "GeneralPurpose",
name: "Standard_D2s_v3",
},
highAvailability: {
mode: postgresql.HighAvailabilityMode.Disabled,
},
administratorLogin: "cloudsa",
administratorLoginPassword: `pa$$w0rd`,
version: "12",
storage: {
storageSizeGB: 32,
},
});
new postgresql.Configuration("backslash_quote", {
resourceGroupName: resourceGroup.name,
serverName: flexibleServer.name,
source: "user-override",
value: "on",
});