Add --extra-files option to plan_summary.py cmd (#2452)

This commit is contained in:
Luca Prete
2024-07-30 11:29:19 +02:00
committed by GitHub
parent 2854ae6bd8
commit 140c4e6446
3 changed files with 18 additions and 2 deletions

View File

@@ -31,9 +31,10 @@ except ImportError:
@click.command()
@click.option('--example', default=False, is_flag=True)
@click.option('--extra-files', default=[], multiple=True)
@click.argument('module', type=click.Path(), nargs=1)
@click.argument('tfvars', type=click.Path(exists=True), nargs=-1)
def main(example, module, tfvars):
def main(example, module, tfvars, extra_files):
try:
if example:
tmp_dir = tempfile.TemporaryDirectory()
@@ -46,7 +47,7 @@ def main(example, module, tfvars):
else:
module = BASEDIR / module
summary = fixtures.plan_summary(module, Path(), tfvars)
summary = fixtures.plan_summary(module, Path(), tfvars, extra_files)
print(yaml.dump({'values': summary.values}))
print(yaml.dump({'counts': summary.counts}))
outputs = {