Skip to content

Commit

Permalink
Fix logic around preferredAz requirement.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkodroff committed Oct 27, 2023
1 parent 533b9a6 commit 2e74139
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions redis-cloud-aws-ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const region = aws.config.region ?? "";
const getPreferredAz = function () {
const value = config.get("preferredAz");

if (region.toLocaleUpperCase() != "us-east-1" && !value) {
if (region.toLowerCase() != "us-east-1" && !value) {
throw new Error("preferredAz must be defined if AWS region is not us-east-1.");
}

Expand Down Expand Up @@ -62,8 +62,6 @@ const database = new rediscloud.SubscriptionDatabase("redis-db", {
throughputMeasurementBy: "operations-per-second",
throughputMeasurementValue: 20000,
replication: true,
}, {
aliases: [{ name: "my-db" }]
});

export const privateEndpoint = database.privateEndpoint;
Expand All @@ -76,7 +74,7 @@ const vpc = new awsx.ec2.Vpc("vpc", {
}
});

const callerIdentity = aws.getCallerIdentity({});
const callerIdentity = aws.getCallerIdentity();

const peering = new rediscloud.SubscriptionPeering("redis-peering", {
subscriptionId: subscription.id,
Expand Down

0 comments on commit 2e74139

Please sign in to comment.