File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -338,8 +338,9 @@ func (c *Config) process() {
338
338
c .Sections .requirements = c .Sections .visibility ("requirements" )
339
339
c .Sections .resources = c .Sections .visibility ("resources" )
340
340
341
- // Footer section optional and should not cause error with --show-all
342
- if c .Sections .ShowAll && c .Sections .footer {
341
+ // Footer section is optional and should only be enabled if --footer-from
342
+ // is explicitly set, either via CLI or config file.
343
+ if c .FooterFrom == "" && ! changedfs ["footer-from" ] {
343
344
c .Sections .footer = false
344
345
}
345
346
}
@@ -403,16 +404,16 @@ func (c *Config) extract() (*print.Settings, *terraform.Options) {
403
404
options := terraform .NewOptions ()
404
405
405
406
// header-from
407
+ settings .ShowHeader = c .Sections .header
406
408
options .ShowHeader = settings .ShowHeader
407
409
options .HeaderFromFile = c .HeaderFrom
408
410
409
411
// footer-from
412
+ settings .ShowFooter = c .Sections .footer
410
413
options .ShowFooter = settings .ShowFooter
411
414
options .FooterFromFile = c .FooterFrom
412
415
413
416
// sections
414
- settings .ShowHeader = c .Sections .header
415
- settings .ShowFooter = c .Sections .footer
416
417
settings .ShowInputs = c .Sections .inputs
417
418
settings .ShowModuleCalls = c .Sections .modulecalls
418
419
settings .ShowOutputs = c .Sections .outputs
You can’t perform that action at this time.
0 commit comments