-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
CFNv2: parameter resolution and presentation #12796
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
base: master
Are you sure you want to change the base?
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 21m 29s ⏱️ - 1h 22m 59s Results for commit 6c4cd17. ± Comparison against base commit 62f162f. This pull request removes 4008 and adds 1 tests. Note that renamed tests count towards both.
This pull request removes 211 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 34m 34s ⏱️ Results for commit 6c4cd17. ♻️ This comment has been updated with latest results. |
@@ -1382,7 +1394,7 @@ def _type_name_of(value: Maybe[Any]) -> str: | |||
|
|||
@staticmethod | |||
def _is_terminal(value: Any) -> bool: | |||
return type(value) in {int, float, bool, str, None, NothingType} | |||
return type(value) in {int, float, bool, str, None, NothingType, ResolvedParameter} |
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.
Can you help me understand why we need this in the modeler?
@@ -304,6 +308,10 @@ def _resolve_reference(self, logical_id: str) -> PreprocEntityDelta: | |||
node_parameter = self._get_node_parameter_if_exists(parameter_name=logical_id) | |||
if isinstance(node_parameter, NodeParameter): | |||
parameter_delta = self.visit(node_parameter) | |||
if isinstance(parameter_delta.before, ResolvedParameter): |
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.
Why do we need to first wrap the relevant values in a ResolvedParameter class and only evaluate them here?
region_name=self._change_set.region_name, | ||
stack_parameter_value=after, | ||
) | ||
after = ResolvedParameter(value=after, resolved_value=resolved_value) |
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.
why are we not resolving the resolved parameter here (this visitor function), but later?
Motivation
We currently don't support the resolution of SSM parameters in the template
Parameters
when performing template describing, only executing. This does not match AWS behaviour, which represents the resolved values as well as the given parameters.Changes
create_change_set
, so we should do it before describing and executing