Closed AvdeevArtem closed 1 year ago
Add --output-file when recursive = true. This can be used when you have a repository with modules nested in folders
--output-file
recursive = true
I have:
This code have tested in docker-compose.
gh-actions-gh-action-1 | _=/usr/bin/env gh-actions-gh-action-1 | INPUT_INDENTION=2 gh-actions-gh-action-1 | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin gh-actions-gh-action-1 | SHLVL=1 gh-actions-gh-action-1 | INPUT_OUTPUT_FORMAT=markdown gh-actions-gh-action-1 | INPUT_TEMPLATE=<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> gh-actions-gh-action-1 | INPUT_WORKING_DIR=dir1,dir2,dir3,dir4,dir5 gh-actions-gh-action-1 | INPUT_RECURSIVE=true gh-actions-gh-action-1 | HOME=/root gh-actions-gh-action-1 | INPUT_RECURSIVE_PATH=. gh-actions-gh-action-1 | INPUT_OUTPUT_METHOD=inject gh-actions-gh-action-1 | PWD=/ gh-actions-gh-action-1 | INPUT_OUTPUT_FILE=README.MD gh-actions-gh-action-1 | INPUT_GIT_PUSH=false gh-actions-gh-action-1 | HOSTNAME=6867a6872924 gh-actions-gh-action-1 | GITHUB_WORKSPACE=/etc/git/terraform-dir5/ gh-actions-gh-action-1 | dir1 gh-actions-gh-action-1 | dir3 gh-actions-gh-action-1 | dir4 gh-actions-gh-action-1 | dir5 gh-actions-gh-action-1 | dir2 gh-actions-gh-action-1 | dir1 gh-actions-gh-action-1 | ::debug working_dir=dir1 gh-actions-gh-action-1 | ::debug output_mode=inject gh-actions-gh-action-1 | ::debug output_file=README.MD gh-actions-gh-action-1 | ::debug terraform-docs markdown --output-mode inject --output-file README.MD --output-template <!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> --output-file README.MD --recursive --recursive-path . dir1 gh-actions-gh-action-1 | dir1/README.MD updated successfully gh-actions-gh-action-1 | dir1/autoscaling-group-with-nlb/README.MD updated successfully gh-actions-gh-action-1 | dir1/k8s-additional-security-groups-rules/README.MD updated successfully gh-actions-gh-action-1 | dir1/kafka-broker/README.MD updated successfully gh-actions-gh-action-1 | dir1/kafka-cluster/README.MD updated successfully gh-actions-gh-action-1 | dir1/linux-group/README.MD updated successfully gh-actions-gh-action-1 | dir1/linux-server/README.MD updated successfully gh-actions-gh-action-1 | dir1/return-subnets-id-by-ip-blocks/README.MD updated successfully gh-actions-gh-action-1 | dir1/s3-bucket/README.MD updated successfully gh-actions-gh-action-1 | dir1/vpc-params/README.MD updated successfully gh-actions-gh-action-1 | dir1/zookeeper-node/README.MD updated successfully gh-actions-gh-action-1 | ::debug No change in dir1/ detected gh-actions-gh-action-1 | dir2 gh-actions-gh-action-1 | ::debug working_dir=dir2 gh-actions-gh-action-1 | ::debug output_mode=inject gh-actions-gh-action-1 | ::debug output_file=README.MD gh-actions-gh-action-1 | ::debug terraform-docs markdown --output-mode inject --output-file README.MD --output-template <!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> --output-file README.MD --recursive --recursive-path . dir2 gh-actions-gh-action-1 | dir2/README.MD updated successfully gh-actions-gh-action-1 | dir2/autoscaled-instance-group/README.MD updated successfully gh-actions-gh-action-1 | dir2/cassandra-backup/README.MD updated successfully gh-actions-gh-action-1 | dir2/cassandra-cluster/README.MD updated successfully gh-actions-gh-action-1 | dir2/cassandra-node/README.MD updated successfully gh-actions-gh-action-1 | dir2/gpu-node/README.MD updated successfully gh-actions-gh-action-1 | dir2/kafka-broker/README.MD updated successfully gh-actions-gh-action-1 | dir2/kafka-cluster/README.MD updated successfully gh-actions-gh-action-1 | dir2/kms/README.MD updated successfully gh-actions-gh-action-1 | dir2/dir4/README.MD updated successfully gh-actions-gh-action-1 | dir2/linux-group/README.MD updated successfully gh-actions-gh-action-1 | dir2/linux-server/README.MD updated successfully gh-actions-gh-action-1 | dir2/network-load-balancer/README.MD updated successfully gh-actions-gh-action-1 | dir2/postgres-mdb/README.MD updated successfully gh-actions-gh-action-1 | dir2/redis/README.MD updated successfully gh-actions-gh-action-1 | dir2/s3-bucket/README.MD updated successfully gh-actions-gh-action-1 | dir2/web-buckets/README.MD updated successfully gh-actions-gh-action-1 | dir2/zookeeper-node/README.MD updated successfully gh-actions-gh-action-1 | ::debug No change in dir2/ detected gh-actions-gh-action-1 | dir3 gh-actions-gh-action-1 | ::debug working_dir=dir3 gh-actions-gh-action-1 | ::debug output_mode=inject gh-actions-gh-action-1 | ::debug output_file=README.MD gh-actions-gh-action-1 | ::debug terraform-docs markdown --output-mode inject --output-file README.MD --output-template <!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> --output-file README.MD --recursive --recursive-path . dir3 gh-actions-gh-action-1 | dir3/README.MD updated successfully gh-actions-gh-action-1 | dir3/cassandra-cluster/README.MD updated successfully gh-actions-gh-action-1 | dir3/cassandra-node/README.MD updated successfully gh-actions-gh-action-1 | dir3/kafka-broker/README.MD updated successfully gh-actions-gh-action-1 | dir3/kafka-cluster/README.MD updated successfully gh-actions-gh-action-1 | dir3/linux-group/README.MD updated successfully gh-actions-gh-action-1 | dir3/linux-server/README.MD updated successfully gh-actions-gh-action-1 | dir3/network-subnets/README.MD updated successfully gh-actions-gh-action-1 | dir3/network-vpc/README.MD updated successfully gh-actions-gh-action-1 | dir3/postgres-database/README.MD updated successfully gh-actions-gh-action-1 | dir3/postgres-server/README.MD updated successfully gh-actions-gh-action-1 | dir3/rabbit-node/README.MD updated successfully gh-actions-gh-action-1 | dir3/redis/README.MD updated successfully gh-actions-gh-action-1 | dir3/web-buckets/README.MD updated successfully gh-actions-gh-action-1 | dir3/zookeeper-node/README.MD updated successfully gh-actions-gh-action-1 | ::debug No change in dir3/ detected gh-actions-gh-action-1 | dir4 gh-actions-gh-action-1 | ::debug working_dir=dir4 gh-actions-gh-action-1 | ::debug output_mode=inject gh-actions-gh-action-1 | ::debug output_file=README.MD gh-actions-gh-action-1 | ::debug terraform-docs markdown --output-mode inject --output-file README.MD --output-template <!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> --output-file README.MD --recursive --recursive-path . dir4 gh-actions-gh-action-1 | dir4/README.MD updated successfully gh-actions-gh-action-1 | dir4/namespace/README.MD updated successfully gh-actions-gh-action-1 | dir4/namespaces/README.MD updated successfully gh-actions-gh-action-1 | dir4/setup/README.MD updated successfully gh-actions-gh-action-1 | ::debug No change in dir4/ detected gh-actions-gh-action-1 | dir5 gh-actions-gh-action-1 | ::debug working_dir=dir5 gh-actions-gh-action-1 | ::debug output_mode=inject gh-actions-gh-action-1 | ::debug output_file=README.MD gh-actions-gh-action-1 | ::debug terraform-docs markdown --output-mode inject --output-file README.MD --output-template <!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS --> --output-file README.MD --recursive --recursive-path . dir5 gh-actions-gh-action-1 | dir5/README.MD updated successfully gh-actions-gh-action-1 | dir5/s3-bucket-extend/README.MD updated successfully gh-actions-gh-action-1 | ::debug No change in dir5/ detected
nvm
Description of your changes
Add
--output-file
whenrecursive = true
. This can be used when you have a repository with modules nested in foldersI have:
How has this code been tested
This code have tested in docker-compose.