Feature
#39 feat: add template variables CreatedResource, UpdatedResources, DeletedResources and ReplacedResources
As a summary of the result of terraform plan
, it is convenient to show a list of resource paths.
So the following template variables are added.
.CreatedResources
: a list of created resource paths ([]string).UpdatedResources
: a list of updated resource paths ([]string).DeletedResources
: a list of deleted resource paths ([]string).ReplacedResources
: a list of replaced resource paths ([]string)
For example,
{{if .CreatedResources}}
* Create
{{- range .CreatedResources}}
* {{.}}
{{- end}}{{end}}{{if .UpdatedResources}}
* Update
{{- range .UpdatedResources}}
* {{.}}
{{- end}}{{end}}{{if .DeletedResources}}
* Delete
{{- range .DeletedResources}}
* {{.}}
{{- end}}{{end}}{{if .ReplacedResources}}
* Replace
{{- range .ReplacedResources}}
* {{.}}
{{- end}}{{end}}
* Create
* null_resource.foo
* Update
* mysql_database.bar
* Delete
* null_resource.bar
* Replace
* mysql_database.foo