yogen48
yogen48

Reputation: 201

Is there a way to rename a cloudformation stack name?

I have a cloudformation stack (which is generated from stack_master), Resources are already created but I would like to put it into serverless framework. I have already added the resources section but It creates new stack. I want the stack to update existing stack and any updates to take from there. Thanks

Upvotes: 16

Views: 12419

Answers (4)

user22371797
user22371797

Reputation: 1

Note AWS CloudFormation only supports one level of nesting using resource import. This means that you can't import a stack into a child stack or import a stack that has children. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html

Upvotes: 0

Andrew Eells
Andrew Eells

Reputation: 815

No longer the case as of 2022 - it looks as though you can retain stack resources whilst deleting the stack containing then, and import those resources into a new stack tldr; I have not done this, just reading the docs https://aws.amazon.com/blogs/infrastructure-and-automation/keep-your-aws-resources-when-you-rename-an-aws-cloudformation-stack/

Upvotes: 8

Abdul Moeez
Abdul Moeez

Reputation: 1401

For most resources, changing the logical name of a resource is equivalent to deleting that resource and replacing it with a new one. Any other resources that depend on the renamed resource also need to be updated and might cause to be replaced. Other resources require you to update a property (not just the logical name) in order to initiate an update.

So Logically you have to delete the stack and create a new one as you want.

You can check out this link: AWS Official Doc

Upvotes: 1

Marcin
Marcin

Reputation: 238051

Its not possible to rename a stack. You have to delete it, and create new one with the name you want.

Upvotes: 20

Related Questions