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

feat: adds terraform-docs action ⚡ #966

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

Gowiem
Copy link
Contributor

@Gowiem Gowiem commented Jan 27, 2025

Info

Copy link

trunk-io bot commented Jan 27, 2025

⏱️ 11m total CI duration on this PR
Job Cumulative Duration Recent Runs
CodeQL-Build 5m 🟩🟩🟩
Trunk Check runner [linux] 3m 🟩🟩🟩
Repo Tests / Plugin Tests 2m 🟩🟩🟩
Action Tests 45s 🟩🟩🟩
Detect changed files 11s 🟩🟩🟩
Aggregate Test Results 1s 🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@Gowiem Gowiem force-pushed the feature/terraform-docs-action branch from 91434ff to a37c8e1 Compare January 27, 2025 15:50
Copy link
Collaborator

@TylerJang27 TylerJang27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for your patience through all this!

Unfortunately we don't yet support referencing tools in Trunk Actions, only package tools. This is a known shortcoming atm. The best you can do is something similar to the commitzen definition, and optionally in your script:

  1. Check for the presence of .trunk/tools/terraform-docs or .trunk/tools/terraform-docs.ps1
  2. If present, evaluate it directly
  3. If terraform-docs is in the PATH, use that
  4. Otherwise call trunk tools install terraform-docs

I'll leave it up to you if you want to add that to your script, this is good to land with or without that change.
6.

@Gowiem
Copy link
Contributor Author

Gowiem commented Jan 28, 2025

Gotcha. For now... let's :shipit: and see if others end up using this. I'll ship and then circle around to one of our bigger projects tomorrow to update it to use this action that way my team can weigh in on how it works. We'll circle back if we need to make any fixes.

Thanks for the help moving this forward @TylerJang27!

@TylerJang27
Copy link
Collaborator

Sounds great. I'm going to try and get an official release out soon, but in the meantime you can always set the ref of the plugin source to use the sha when this lands on main

@TylerJang27 TylerJang27 merged commit ef0d912 into trunk-io:main Jan 28, 2025
12 checks passed
@Gowiem Gowiem deleted the feature/terraform-docs-action branch January 29, 2025 04:06
TylerJang27 pushed a commit that referenced this pull request Jan 29, 2025
## Info

* Follow up from #966 - Executing `python` doesn't do the trick, the
executable needs to be `python3`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support terraform-docs
2 participants