Created
May 22, 2019 01:35
-
-
Save BerndWessels/91c1baff6f4b1ab9132d840d2c817baf to your computer and use it in GitHub Desktop.
BFF pulumi aurora serverless
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Aurora Serverless | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
const dbCluster = new aws.rds.Cluster("dbCluster", { | |
applyImmediately: true, | |
clusterIdentifier: "mycluster", | |
engineMode: "serverless", | |
iamDatabaseAuthenticationEnabled: false, | |
port: 3306, | |
masterPassword: "PASSWORD", | |
masterUsername: "USERNAME", | |
scalingConfiguration: { | |
autoPause: true, | |
maxCapacity: 1, | |
minCapacity: 1, | |
secondsUntilAutoPause: 600, | |
}, | |
skipFinalSnapshot: true, | |
}); | |
// TODO Automatically enable Data API once it becomes available in pulumi. | |
exports.dbClusterEndpoint = dbCluster.endpoint; | |
const dbClusterSecret = new aws.secretsmanager.Secret("dbClusterSecret", {}); | |
const dbClusterSecretVersion = new aws.secretsmanager.SecretVersion("dbClusterSecretVersion", { | |
secretId: dbClusterSecret.id, | |
secretString: JSON.stringify({ | |
username: 'USERNAME', | |
password: 'PASSWORD', | |
}), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment