-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: ImportExistingResources attribute on update-stacks task #432
Comments
Please find the most basic set of templates and shell scripts to create, move and clean-up a LogGroup between two stacks. Assumes account and region is included in the profile that is passed as an argument to the script. Next step is to do this in Typescript. As an aside: it proves that the resource doesn't have to be defined in exactly the same way in the target template as in the source template, because I modified the value for 1-setup.sh -> create a source and target stack. Update source stack by removing a resource that then becomes orphaned |
Let's look at potential implementations per step:
(6) continue normal flow |
Added PoC code to implement step 2-move.sh in Typescript. 1-setup.sh -> create a source and target stack. Update source stack by removing a resource that then becomes orphaned |
Subject of the issue
I would like to easily refactor stacks, especially move resources from one stack to another that cannot be deleted (either because they contain data or because it will cause downtime)
Expected behavior
One possible implementation would be the following when executing an update-stacks task:
Since this behavior will greatly slow down the deployment of the stack, it should be enabled with a flag. e.g.
This will allow me, as per the example, to simply move a resource from the
tables.yml
to thebastion.yml
assuming theDeletionPolicy
is set toRetain
. Having the flagImportExistingResources
, will only slow down the actual execution, but won't have side-effects if there is nothing to import. After having executed it, one would remove the flag from the task.A challenge will be that such a change may not create new resources in the same action as importing existing resources as per https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html#resource-import-considerations
The text was updated successfully, but these errors were encountered: