-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.ts
40 lines (35 loc) · 1.24 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
36
37
38
39
40
// 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: "westus",
});
const flexibleServer = new postgresql.Server("server", {
location: resourceGroup.location,
resourceGroupName: resourceGroup.name,
sku: {
tier: "GeneralPurpose",
name: "Standard_D2s_v3",
},
highAvailability: {
mode: postgresql.HighAvailabilityMode.SameZone,
},
administratorLogin: "cloudsa",
administratorLoginPassword: `pa$$w0rd`,
version: "14",
storage: {
storageSizeGB: 64,
},
});
// Blocked tu to #898
// new postgresql.Configuration("ssl", {
// resourceGroupName: resourceGroup.name,
// serverName: flexibleServer.name,
// configurationName: "ssl",
// value: "on",
// source: "user-override",
// });
export const resourceGroupName = resourceGroup.name;
export const serverName = flexibleServer.name;