Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(elasticache): update console URLs #524

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/common/url/AwsConsoleUrlFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export class AwsConsoleUrlFactory {
const region = this.awsAccountRegion;
switch (clusterType) {
case ElastiCacheClusterType.MEMCACHED:
const destinationUrlMemcached = `https://${region}.console.aws.amazon.com/elasticache/home?region=${region}#memcached-nodes:id=${clusterId};nodes`;
const destinationUrlMemcached = `https://${region}.console.aws.amazon.com/elasticache/home?region=${region}#/memcached/${clusterId}`;
return this.getAwsConsoleUrl(destinationUrlMemcached);
case ElastiCacheClusterType.REDIS:
const destinationUrlRedis = `https://${region}.console.aws.amazon.com/elasticache/home?region=${region}#redis-shards:redis-id=${clusterId}`;
const destinationUrlRedis = `https://${region}.console.aws.amazon.com/elasticache/home?region=${region}#/redis/${clusterId}`;
return this.getAwsConsoleUrl(destinationUrlRedis);
default:
throw new Error(`Invalid cache type: ${clusterType}`);
Expand Down
4 changes: 2 additions & 2 deletions test/common/url/AwsConsoleUrlFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ test("getElastiCacheClusterUrl (memcached)", () => {
const factory = new AwsConsoleUrlFactory({ awsAccountId, awsAccountRegion });

const expected =
"https://eu-west-1.console.aws.amazon.com/elasticache/home?region=eu-west-1#memcached-nodes:id=DummyDomainName;nodes";
"https://eu-west-1.console.aws.amazon.com/elasticache/home?region=eu-west-1#/memcached/DummyDomainName";

expect(
stack.resolve(
Expand All @@ -303,7 +303,7 @@ test("getElastiCacheClusterUrl (redis)", () => {
const factory = new AwsConsoleUrlFactory({ awsAccountId, awsAccountRegion });

const expected =
"https://eu-west-1.console.aws.amazon.com/elasticache/home?region=eu-west-1#redis-shards:redis-id=DummyDomainName";
"https://eu-west-1.console.aws.amazon.com/elasticache/home?region=eu-west-1#/redis/DummyDomainName";

expect(
stack.resolve(
Expand Down