diff --git a/sceptre/stack.py b/sceptre/stack.py index 7c2967577..f085ced7f 100644 --- a/sceptre/stack.py +++ b/sceptre/stack.py @@ -263,7 +263,7 @@ def __init__( ) self.s3_details = s3_details - self.parameters = self._ensure_parameters(parameters or {}) + self.parameters = self._cast_parameters(parameters or {}) self.sceptre_user_data = sceptre_user_data or {} self.notifications = notifications or [] @@ -276,10 +276,10 @@ def _ensure_boolean(self, config_name: str, value: Any) -> bool: ) return value - def _ensure_parameters( + def _cast_parameters( self, parameters: Dict[str, Any] ) -> Dict[str, Union[str, List[Union[str, Resolver]], Resolver]]: - """Ensure CloudFormation parameters are of valid types""" + """Cast CloudFormation parameters to valid types""" def cast_value(value: Any) -> Union[str, List[Union[str, Resolver]], Resolver]: if isinstance(value, bool): @@ -311,6 +311,7 @@ def is_valid(value: Any) -> bool: raise InvalidConfigFileError( f"{self.name}: Values for parameters must be strings, lists or resolvers, got {casted_parameters}" ) + return casted_parameters def __repr__(self):