简体   繁体   English

从一个堆栈中分离出 redis 集群

[英]seperate redis cluster from one stack

I have a Redis Cluster which was created by using aws-cdk(python) .我有一个Redis Cluster ,它是使用aws-cdk(python)创建的。 Basically i created this redis-cluster as a part of service-stack基本上我创建了这个redis-cluster作为service-stack的一部分

my service-stack looks like below我的服务堆栈如下所示

s3 bucket
ecs cluster
lambda function
redis cluster

I want to seperate redis cluster from service-stack and want to place in another stack like redis-stack我想将redis clusterservice-stack分开,并想放在另一个堆栈中,例如redis-stack

Possible solution I need to remove redis cluster from service-stack and create an another stack called redis-stack and deploy my redis cluster可能的解决方案我需要从service-stack中删除redis cluster并创建另一个名为redis-stack并部署我的redis cluster

Issue My redis cluster is already deployed in PROD .问题我的redis cluster已经部署在PROD中。 I dont want to delete redis cluster我不想删除redis cluster

Goal without deleting existing redis cluster , I want to move the redis cluster from service-stack to redis-stack目标是不删除现有的redis cluster ,我想将redis clusterservice-stack移动到redis-stack

Can anyone suggest a solution for this?谁能为此提出解决方案?

Generally it is possible to do it through import procedure as explained in Moving resources between stacks .通常可以通过在堆栈之间移动资源中解释的导入过程来完成。

However, AWS::ElastiCache::CacheCluster does not support import procedure.但是, AWS::ElastiCache::CacheCluster不支持导入过程。 Only some resources support it .只有一些资源支持它 Sadly, ElastiCache is not one of these resources.遗憾的是,ElastiCache 不是这些资源之一。

So if you don't want to touch your prod cluster, for now you are stuck with what you have.因此,如果您不想接触您的产品集群,那么现在您只能使用现有的东西。 Maybe in a near future support for importing, and subsequently moving AWS::ElastiCache::CacheCluster will be added to CloudFormation.也许在不久的将来,对导入和随后移动AWS::ElastiCache::CacheCluster的支持将被添加到 CloudFormation。 Otherwise you would have to snapshot it, and recreated in a new stack.否则您将不得不对其进行快照,并在新堆栈中重新创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM