Reputation: 116
I have existing EC2 instance running on AWS. It was created manually.
Is there a way to move existing instance to the cloud formation stack and be able to update it via cloud formation? Or existing instance should be deleted and new should be created by Cloud Formation?
When I create new instance from the template. It creates new instance on AWS.
Upvotes: 0
Views: 307
Reputation: 270089
Yes! It just got announced...
From New – Import Existing Resources into a CloudFormation Stack | AWS News Blog:
To import existing resources into a CloudFormation stack, you need to provide:
- A template that describes the entire stack, including both the resources to import and (for existing stacks) the resources that are already part of the stack.
- Each resource to import must have a DeletionPolicy attribute in the template. This enables easy reverting of the operation in a completely safe manner.
- A unique identifier for each target resource, for example the name of the Amazon DynamoDB table or of the Amazon Simple Storage Service (S3) bucket you want to import.
So, you need to edit the template, and then import the resource into the stack.
Upvotes: 1