|
7 | 7 |
|
8 | 8 | def _get_parameter_value(parameters: Dict[str, Any], param_name: str, default: Any = None) -> Any: |
9 | 9 | """ |
10 | | - Get parameter value from parameters dict, but return None if it's a CloudFormation internal placeholder. |
| 10 | + Get parameter value from parameters dict, but return default (None) if it's a CloudFormation internal placeholder. |
11 | 11 |
|
12 | 12 | CloudFormation internal placeholders are passed during changeset creation with --include-nested-stacks |
13 | 13 | when there are cross-references between nested stacks that don't exist yet. |
@@ -127,10 +127,7 @@ def resolve_parameter_refs(self, input_dict: Optional[Any], parameters: Dict[str |
127 | 127 | return input_dict |
128 | 128 |
|
129 | 129 | # Use the wrapper function to get parameter value |
130 | | - # It returns None if the parameter is a CloudFormation internal placeholder |
131 | | - |
132 | | - # If param_value is None, either the parameter doesn't exist or it's a placeholder |
133 | | - # Return the original input unchanged |
| 130 | + # It returns the original input unchanged if the parameter is a CloudFormation internal placeholder |
134 | 131 | return _get_parameter_value(parameters, param_name, input_dict) |
135 | 132 |
|
136 | 133 | def resolve_resource_refs( |
@@ -220,7 +217,7 @@ def do_replacement(full_ref: str, prop_name: str) -> Any: |
220 | 217 | :return: Either the value it resolves to. If not the original reference |
221 | 218 | """ |
222 | 219 | # Use the wrapper function to get parameter value |
223 | | - # It returns None if the parameter is a CloudFormation internal placeholder |
| 220 | + # It returns the original input unchanged if the parameter is a CloudFormation internal placeholder |
224 | 221 | return _get_parameter_value(parameters, prop_name, full_ref) |
225 | 222 |
|
226 | 223 | return self._handle_sub_action(input_dict, do_replacement) |
|
0 commit comments