graph LR
Stack_Differ["Stack Differ"]
Diff_Writer["Diff Writer"]
Stack_Differ -- "produces data for" --> Diff_Writer
Diff_Writer -- "consumes data from" --> Stack_Differ
The Diffing & Reporting Module is primarily encapsulated within the sceptre.diffing package. Its core functionality is provided by the sceptre.diffing.stack_differ and sceptre.diffing.diff_writer components, which handle the comparison of stack configurations and templates, and the subsequent formatting and presentation of these differences, respectively.
This component is the core engine for identifying discrepancies between the local Sceptre stack configuration and template, and their corresponding deployed state in AWS CloudFormation. Its responsibilities include: Generating the local stack template and configuration, retrieving the deployed stack template and configuration from AWS, performing a detailed comparison of parameters, template body, and other stack properties, and handling specific CloudFormation nuances like NoEcho parameters and default values during comparison to ensure accurate diffs.
Related Classes/Methods:
This component is responsible for transforming the raw difference data provided by the Stack Differ into a human-readable and visually appealing report. Its responsibilities include: Determining the presence and type of differences (configuration, template, or both), applying formatting, styling, and colorization to highlight changes in the output, orchestrating the presentation of the diff, including new stack details, configuration changes, and template changes, and serializing and dumping complex data structures (like stack configurations) into a readable format for display.
Related Classes/Methods: