runway.cfngin.actions.diff module¶
CFNgin diff action.
- class runway.cfngin.actions.diff.Action[source]¶
Bases:
Action
Responsible for diffing CloudFormation stacks in AWS and locally.
Generates the deploy plan based on stack dependencies (these dependencies are determined automatically based on references to output values from other stacks).
The plan is then used to create a changeset for a stack using a generated template based on the current config.
- post_run(*, dump: bool | str = False, outline: bool = False, **_Action__kwargs: Any) None [source]¶
Do nothing.
- class runway.cfngin.actions.diff.DictValue[source]¶
Bases:
Generic
[_OV
,_NV
]Used to create a diff of two dictionaries.
- runway.cfngin.actions.diff.diff_dictionaries(old_dict: dict[str, _OV], new_dict: dict[str, _NV]) tuple[int, list[DictValue[_OV, _NV]]] [source]¶
Calculate the diff two single dimension dictionaries.
- Parameters:
old_dict – Old dictionary.
new_dict – New dictionary.
- Returns:
Number of changed records and the
DictValue
object containing the changes.
- runway.cfngin.actions.diff.diff_parameters(old_params: dict[str, _OV], new_params: dict[str, _NV]) list[DictValue[_OV, _NV]] [source]¶
Compare the old vs. new parameters and returns a “diff”.
If there are no changes, we return an empty list.
- Parameters:
old_params – old parameters
new_params – new parameters
- Returns:
A list of differences.
- runway.cfngin.actions.diff.format_params_diff(parameter_diff: list[DictValue[Any, Any]]) str [source]¶
Handle the formatting of differences in parameters.
- Parameters:
parameter_diff – A list of
DictValue
detailing the differences between two dicts returned bydiff_dictionaries()
.- Returns:
A formatted string that represents a parameter diff