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

chore: generate and maintain in-repo module documentation #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

displague
Copy link
Contributor

@displague displague commented Jul 23, 2024

The generate-terraform-docs workflow will use the terraform-docs/gh-actions action to generate Terraform documentation based on the module's provider requirements, variables, and outputs.

The peter-evans/create-pull-request action will open new pull requests to ensure that the README.md of each module, including the root module, includes this generated content and that the content stays up to date as changes are made to the project.

An example of the output is here: https://github.com/equinix-labs/terraform-equinix-metal-k3s?tab=readme-ov-file#terraform-module-documentation

@devenkulkarni devenkulkarni self-requested a review August 13, 2024 10:28
@devenkulkarni
Copy link
Collaborator

I reviewed the changes and do not see anything blocking our operation with the repo...
The PR includes a github actions workflow and needs the repo CI env var and permissions hence our existing github action workflow is failing with CI errors.

@dnoland1 I think we can approve and merge the PR.

@displague
Copy link
Contributor Author

@devenkulkarni I fixed the merge conflict in README.md. Who can merge this?

Copy link
Collaborator

@glovecchi0 glovecchi0 left a comment

Choose a reason for hiding this comment

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

Given the error in the CI phase, it may be necessary to add the environment variables as done for the other pipeline.

        env:
          METAL_AUTH_TOKEN: ${{ secrets.metal_auth_token }}
          TF_VAR_project_name: Harvester Labs
          TF_VAR_api_key: ${{ secrets.metal_auth_token }}

cc: @displague

The generate-terraform-docs workflow will use the terraform-docs/gh-actions action to generate Terraform documentation based on the module's provider requirements, variables, and outputs.

The peter-evans/create-pull-request action will open new pull requests to ensure that the README.md of each module, including the root module, includes this generated content and that the content stays up to date as changes are made to the project.

Signed-off-by: Marques Johansson <[email protected]>
@displague
Copy link
Contributor Author

If https://github.com/rancherlabs/terraform-harvester-equinix/blob/main/variables.tf#L21 was true (make the Harvester Demo project by default), the only required variables would be Metal API tokens.

@glovecchi0
Copy link
Collaborator

If https://github.com/rancherlabs/terraform-harvester-equinix/blob/main/variables.tf#L21 was true (make the Harvester Demo project by default), the only required variables would be Metal API tokens.

Good point! Please, open an issue to set the default value to true.

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

Successfully merging this pull request may close these issues.

3 participants