sparse-intern-71089
12/20/2023, 7:48 PMlittle-cartoon-10569
12/20/2023, 8:51 PMstale-answer-34162
12/20/2023, 8:51 PMlittle-cartoon-10569
12/20/2023, 9:30 PMlittle-cartoon-10569
12/20/2023, 9:31 PMstale-answer-34162
12/20/2023, 9:32 PMlittle-cartoon-10569
12/20/2023, 9:34 PMimport: "user-redis-engine_log-eks-dev-20231220"
after ignoreChanges: ["name"]
and it'll import.little-cartoon-10569
12/20/2023, 9:35 PMstale-answer-34162
12/20/2023, 9:37 PMexport const userSlowLog = new aws.cloudwatch.LogGroup(userRedisSlowLogName, {
name: userRedisSlowLogName,
tags: additionalDefaultTags,
});
export const userRedisEngineLog = new aws.cloudwatch.LogGroup(userRedisEngineLogName, {
name: userRedisEngineLogName,
tags: additionalDefaultTags,
});
little-cartoon-10569
12/20/2023, 10:48 PMname
? It's generally recommended not to.stale-answer-34162
12/20/2023, 11:11 PMlittle-cartoon-10569
12/20/2023, 11:12 PMname
property should be used only when you need a "well-known" name: maybe for legacy reasons, or because a 3rd party unconfigurable app requires a resource to have a specific name.stale-answer-34162
12/20/2023, 11:14 PMconst userRedisSlowLogName = `user-redis-slow_log-${stack}`;
const userRedisEngineLogName = `user-redis-engine_log-${stack}`;
export const userSlowLog = new aws.cloudwatch.LogGroup(userRedisSlowLogName, {
name: userRedisSlowLogName,
tags: additionalDefaultTags,
});
export const userRedisEngineLog = new aws.cloudwatch.LogGroup(userRedisEngineLogName, {
name: userRedisEngineLogName,
tags: additionalDefaultTags,
});
const redisName = `user-redis-${stack}`;
const redisSubnetGroupName = `user-redis-subnet-group-${stack}`;
const redisEngineVersion = '7.1'; // Use the latest stable version
const redisMaintenanceWindow = 'sun:03:00-sun:04:00'; // Set to off-peak hours
const redisNodeType = 'cache.r6g.large'; // Use a memory-optimized instance type
const redisNumCacheClusters = 3; // Increase number of nodes for high availability and read scalability
export const userRedisSubnetGroup = new aws.elasticache.SubnetGroup(redisSubnetGroupName, {
description: 'Managed by Pulumi',
name: redisSubnetGroupName,
tags: additionalDefaultTags,
subnetIds: eksVpc.privateSubnetIds,
});
export const redisSecurityGroup = new aws.ec2.SecurityGroup('redisSecurityGroup', {
description: 'Redis Security Group',
name: 'redisSecurityGroup',
tags: additionalDefaultTags,
});
export const userRedis = new aws.elasticache.ReplicationGroup(redisName, {
autoMinorVersionUpgrade: true,
automaticFailoverEnabled: true,
engineVersion: redisEngineVersion,
maintenanceWindow: redisMaintenanceWindow,
multiAzEnabled: false,
networkType: 'ipv4',
nodeType: redisNodeType,
numCacheClusters: redisNumCacheClusters,
parameterGroupName: 'default.redis7.cluster.on', // Use the parameter group that matches the engine version
port: 6379,
replicationGroupId: redisName,
securityGroupIds: [redisSecurityGroup.id],
snapshotWindow: '07:00-08:00',
tags: additionalDefaultTags,
description: 'Managed by Pulumi',
},
{
dependsOn: [
eksCluster,
cniPolicyAttachment,
ec2ContainerpolicyAttachment,
nextgenNodePolicyAttachment,
workerNodepolicyAttachment,
],
protect: false,
});
little-cartoon-10569
12/20/2023, 11:16 PMlittle-cartoon-10569
12/20/2023, 11:17 PMstale-answer-34162
12/20/2023, 11:18 PMstale-answer-34162
12/20/2023, 11:27 PMlittle-cartoon-10569
12/21/2023, 12:11 AMstale-answer-34162
12/21/2023, 12:12 AM