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

How to exclude a folder in current working directory for TFDOCS #76

Open
vara-bonthu opened this issue Feb 16, 2022 · 0 comments
Open

Comments

@vara-bonthu
Copy link

vara-bonthu commented Feb 16, 2022

What problem are you facing?

I am using this workflow to update Terraform Readme with Docs. My module contains number of folders under root including some examples.

My folder structure as follows. I would like to run this workflow only for modules folder and the root folder where main.tf file is located.

  |--designs
  |--examples
  |--modules
      |--mod1 
      |--mod2
  |--main.tf
  |--variables.tf

here is my workflow example

     - uses: actions/checkout@v2
        if: ${{ (github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'pull_request') }}
        with:
          fetch-depth: 0
          ref: ${{ github.event.pull_request.head.ref }}
          repository: ${{github.event.pull_request.head.repo.full_name}}

     - name: Render terraform docs inside the README.md and push changes back to PR branch
        uses: terraform-docs/[email protected]
        if: github.event.pull_request.head.repo.full_name == github.repository
        with:
          find-dir: .
          output-file: README.md
          output-method: inject
          git-push: "true"

How could terraform-docs help solve your problem?

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

No branches or pull requests

1 participant