feat(migrate-template-gen): add readme generator #13948
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Add README generator for using generated CFN stack templates to aid customers for stack refactoring Gen1 resources into Gen2 stack.
There will be one README per category and will be stored along with templates under
.amplify/migration/templates/<category>
. The reason for not have a single README is it will become too long a file for customers to sift through. Verified this structure with @josefaidt.TODO: Add rollback step for Refactor (step 3)
Note: The actual generation of templates and the command to invoke it will be in different PR(s) to keep all PRs small.
Sample README output for storage category
Stack refactor steps for storage category
STEP 1: UPDATE GEN-1 STORAGE STACK
It is a non-disruptive update since the template only replaces resource references with their resolved values. This is a required step to execute cloudformation stack refactor later.
Rollback step:
STEP 2: REMOVE GEN-2 STORAGE STACK RESOURCES
This step is required since we will eventually replace gen-2 resources with gen-1 resources as part of Step 3 (refactor) .
Rollback step:
STEP 3: CREATE AND EXECUTE CLOUDFORMATION STACK REFACTOR FOR storage CATEGORY
This step will move the Gen1 storage resources to Gen2 stack.
3.a) Upload the source and destination templates to S3
3.b) Create stack refactor
3.c) Describe stack refactor to check for creation status
3.d) Execute stack refactor
3.e) Describe stack refactor to check for execution status
Description of how you validated changes
test locally following the README. There is an existing bug with refactor API related to Tags and Properties that is preventing it from successfully executing.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.