-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
CFNv2: Implement get_template #12865
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
Conversation
LocalStack Community integration with Pro 2 files 2 suites 23m 41s ⏱️ Results for commit b5b2b09. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 34m 30s ⏱️ Results for commit b5b2b09. ♻️ This comment has been updated with latest results. |
757ff16 to
96caa53
Compare
| if template_stage == TemplateStage.Processed and "Transform" in stack.template_body: | ||
| copy_template = copy.deepcopy(stack.template_original) | ||
| for key in [ | ||
| "ChangeSetName", | ||
| "StackName", | ||
| "StackId", | ||
| "Transform", | ||
| "Conditions", | ||
| "Mappings", | ||
| ]: | ||
| copy_template.pop(key, None) | ||
| for key in ["Parameters", "Outputs"]: | ||
| if key in copy_template and not copy_template[key]: | ||
| copy_template.pop(key) | ||
| for resource in copy_template.get("Resources", {}).values(): | ||
| resource.pop("LogicalResourceId", None) | ||
| template_body = json.dumps(copy_template) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: Not a fan of this. I believe this is one of the points we discussed in the CFn syncs long ago where we wanted to have an actual attribute of stack that stores the processed template and not version of stack state converted into a template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a fair point. I will see about storing the transformed template after we have performed the transform. Thanks
|
|
||
| return GetTemplateOutput( | ||
| TemplateBody=template_body, | ||
| StagesAvailable=[TemplateStage.Original, TemplateStage.Processed], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Are stages: Original and Processed always available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in parity with the old provider, but I will check. Thanks for flagging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems both options are always available and there are no other options so I think we are good here.
This confuses our messaging system and returns "please buy pro"
25a0b71 to
e19ca94
Compare
pinzon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing my comments. 👍
Motivation
The new provider does not support the
GetTemplateoperation. This PR implements an initial version.Changes