-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
30 lines (25 loc) · 898 Bytes
/
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
// Ensure the cluster password input is a secret.
const clusterPassword = config.requireSecret("clusterPassword");
const cluster = new aws.rds.Cluster("default", {
availabilityZones: [
"us-west-2a",
"us-west-2b",
"us-west-2c",
],
backupRetentionPeriod: 5,
clusterIdentifier: "aurora-cluster-demo",
databaseName: "mydb",
engine: "aurora-mysql",
engineVersion: "5.7.mysql_aurora.2.03.2",
preferredBackupWindow: "07:00-09:00",
masterUsername: "foo",
masterPassword: clusterPassword,
}, {
// Ensure the cluster password output is a secret.
additionalSecretOutputs: ["masterPassword"],
});
export const clusterUsernameOutput = cluster.masterUsername;
export const clusterPasswordOutput = cluster.masterPassword;