From 2c5ea628c8d84e2211a8869a9ec8173e76c74aec Mon Sep 17 00:00:00 2001 From: droguljic <1875821+droguljic@users.noreply.github.com> Date: Wed, 6 May 2026 14:21:11 +0200 Subject: [PATCH] refactor: remove unused `UpstashRedis` default `dbName` The component internally used the default value for `dbName`, but since the `dbName` property is required, the default is never used. --- src/components/redis/README.md | 1 - src/components/redis/upstash-redis.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/redis/README.md b/src/components/redis/README.md index 3ae5e763..ce1a0dbe 100644 --- a/src/components/redis/README.md +++ b/src/components/redis/README.md @@ -40,7 +40,6 @@ export const passwordSecretArn = redis.password.secret.arn; - `ElastiCacheRedis` always creates a VPC-bound, single-node Redis `aws.elasticache.Cluster` with `numCacheNodes: 1` and port `6379`; it does not create a replication group. - The ElastiCache subnet group is built from `vpc.isolatedSubnetIds`, and the Redis security group allows TCP/6379 ingress from the VPC CIDR block. - `ElastiCacheRedis` does not configure transit encryption, auth tokens, automatic failover, replication groups, backups, or multi-AZ failover. -- `UpstashRedis.Args.dbName` is currently required for TypeScript callers. The implementation still computes a fallback database name of `${project}-${stack}` before merging caller input, but callers should provide `dbName` until the public type is relaxed. - `UpstashRedis` merges internal defaults of `region: 'global'` and `primaryRegion: 'us-east-1'` before creating the database. - `UpstashRedis` always sets `eviction: true` and `tls: true` on the Upstash database. - `UpstashRedis` creates a nested `Password` component from `instance.password`, so the Upstash password is copied into AWS Secrets Manager. diff --git a/src/components/redis/upstash-redis.ts b/src/components/redis/upstash-redis.ts index 7d5b9824..fbea0a6b 100644 --- a/src/components/redis/upstash-redis.ts +++ b/src/components/redis/upstash-redis.ts @@ -48,8 +48,7 @@ export class UpstashRedis extends pulumi.ComponentResource { }, ); - const dbName = `${pulumi.getProject()}-${pulumi.getStack()}`; - const argsWithDefaults = mergeWithDefaults({ ...defaults, dbName }, args); + const argsWithDefaults = mergeWithDefaults(defaults, args); this.name = name; this.instance = new upstash.RedisDatabase(