|
1 | 1 | # Terraform Plan Analysis Report |
2 | 2 |
|
3 | 3 | ## Summary |
| 4 | + |
4 | 5 | - **Total Resources**: {{ total_resources }} |
5 | 6 | - **Resources to Add**: {{ resources_to_add }} |
6 | 7 | - **Resources to Change**: {{ resources_to_change }} |
7 | 8 | - **Resources to Destroy**: {{ resources_to_destroy }} |
8 | 9 |
|
9 | 10 | ## Resource Changes |
| 11 | + |
10 | 12 | {% for resource in resources %} |
| 13 | +{# <!-- markdownlint-disable-next-line MD022 --> #} |
11 | 14 | ### {{ resource.resource_type }}.{{ resource.identifier }} |
12 | | -**Action:** {{ resource.action | upper }} |
| 15 | + |
| 16 | +**Action:** {{ resource.action | title }} |
| 17 | + |
13 | 18 | {% if resource.replacement and resource.replacement_triggers %} |
14 | | -- **Replacement triggered by:** {{ resource.replacement_triggers | join(', ') }} |
| 19 | +{# <!-- markdownlint-disable-next-line MD032 --> #} |
| 20 | +**Replacement triggered by:** {{ resource.replacement_triggers | join(', ') }} |
15 | 21 | {% endif %} |
16 | 22 | {% if resource.changes %} |
17 | | -#### Changes: |
| 23 | +{# <!-- markdownlint-disable-next-line MD022 --> #} |
| 24 | +#### Changes for {{ resource.resource_type }}.{{ resource.identifier }} |
| 25 | + |
18 | 26 | {% for change in resource.changes %} |
19 | | -- **{{ change.attribute }}**: {{ change.before }} → {{ change.after }} |
| 27 | +{# <!-- markdownlint-disable MD032 --> #} |
| 28 | +{% if resource.action == 'create' %} |
| 29 | +- **{{ change.attribute }}**: {{ change.after }} |
| 30 | +{% elif resource.action == 'delete' %} |
| 31 | +- **{{ change.attribute }}**: {{ change.before }} |
| 32 | +{% else %} |
| 33 | +- **{{ change.attribute }}**: |
| 34 | + - Before: {{ change.before }} |
| 35 | + - After: {{ change.after }} |
| 36 | +{% endif %} |
| 37 | +{# <!-- markdownlint-enable MD032 --> #} |
20 | 38 | {% endfor %} |
21 | 39 | {% endif %} |
22 | 40 | {% if show_details %} |
23 | | -#### Details: |
| 41 | +{# <!-- markdownlint-disable-next-line MD032 --> #} |
| 42 | + |
| 43 | +#### Details for {{ resource.resource_type }}.{{ resource.identifier }} |
| 44 | + |
24 | 45 | - **Provider**: {{ resource.provider }} |
25 | 46 | - **Module**: {{ resource.module }} |
| 47 | +{% if resource.dependencies %} |
26 | 48 | - **Dependencies**: {{ resource.dependencies|join(', ') }} |
27 | 49 | {% endif %} |
| 50 | +{# end if show_details #} |
| 51 | +{% endif %} |
| 52 | +{# The next line is blank so an empty line is rendered after Details #} |
| 53 | + |
28 | 54 | {% endfor %} |
29 | 55 |
|
| 56 | +{%- if analysis and analysis|length > 0 -%} |
| 57 | +{# <!-- markdownlint-disable-next-line MD022 --> #} |
30 | 58 | ## Analysis |
31 | | -{% if analysis %} |
32 | | -{% for item in analysis %} |
| 59 | + |
| 60 | +{%- for item in analysis -%} |
| 61 | +{# <!-- markdownlint-disable-next-line MD022 --> #} |
33 | 62 | ### {{ item.title }} |
| 63 | + |
| 64 | +{# <!-- markdownlint-disable-line MD003 MD022 --> #} |
34 | 65 | {{ item.description }} |
35 | 66 | {% endfor %} |
36 | 67 | {% endif %} |
37 | | - |
38 | 68 | --- |
39 | | -*Generated by tfsumpy on {{ timestamp }}* |
| 69 | +*Generated by [tfsumpy](https://github.com/rafaelherik/tfsumpy) on {{ timestamp }}* |
0 commit comments