Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin does not get called #8

Open
timharsch opened this issue Sep 12, 2022 · 0 comments
Open

plugin does not get called #8

timharsch opened this issue Sep 12, 2022 · 0 comments

Comments

@timharsch
Copy link

I can't seem to get my plugin called.

I created a repo from this template. Renamed the repo to 'tfdocs-format-custom'. And made the following changes.

diff --git a/Makefile b/Makefile
index b531e2c..43bc6b1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-BUILD_NAME := tfdocs-format-template
+BUILD_NAME := tfdocs-format-custom
 
 BUILD_DIR     := bin
 PLUGIN_FOLDER ?= ~/.tfdocs.d/plugins
@@ -21,4 +21,4 @@ install: build
        mkdir -p $(PLUGIN_FOLDER)
        mv ./$(BUILD_DIR)/$(GOOS)-$(GOARCH)/$(BUILD_NAME) $(PLUGIN_FOLDER)
 
-.PHONY: all clean verify build install help
\ No newline at end of file
+.PHONY: all clean verify build install help
diff --git a/main.go b/main.go
index b278cbc..7c975e8 100644
--- a/main.go
+++ b/main.go
@@ -47,5 +47,5 @@ func printerFunc(config *print.Config, module *terraform.Module) (string, error)
                return "", err
        }
 
-       return rendered, nil
+       return "SOME NEW OUTPUT" + rendered, nil
 }

I then ran make install, which put the executable in ~/.tfdocs.d/plugins/tfdocs-format-custom. I then create my config in
.config/.terraform-docs.yaml, and set the formatter: "custom". I then ran terraform-docs via terraform-docs markdown table --output-file README.md . Unfortunately, the generated README.md does not contain "SOME NEW OUTPUT". I know it read my config file because I change other things in .config/.terraform-docs.yaml and it will have effect.

Am I missing a step here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant