Skip to content

Commit

Permalink
test terraform-docs (#148)
Browse files Browse the repository at this point in the history
* test terraform-docs

* terraform-docs: automated action

* Run Terraform Docs

* Update action.yml

* Update action.yml

* Update action.yml

* terraform-docs: automated action

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
waltergrasselli and github-actions[bot] committed Feb 14, 2023
1 parent 63c1633 commit 2c624f2
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/actions/run-terraform-docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Run Terraform Docs
description: --

runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render terraform docs and push changes back to PR
uses: terraform-docs/gh-actions@main
with:
working-dir: "${{ env.terraform_workingdir }}"
output-file: README.md
output-method: inject
git-push: "true"
args: --hide providers --hide requirements --hide modules
15 changes: 14 additions & 1 deletion .github/workflows/application-insights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,17 @@ jobs:
- name: Unit-test
run: go test -v -timeout 45m
env:
GOPATH: "/home/runner/work/azure-labs-modules/azure-labs-modules/${{ env.terraform_workingdir }}"
GOPATH: "/home/runner/work/azure-labs-modules/azure-labs-modules/${{ env.terraform_workingdir }}"

terraform-docs:
name: Run Terraform Docs
needs:
- terratest
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Render terraform docs and push changes back to PR
uses: ./.github/actions/run-terraform-docs
29 changes: 29 additions & 0 deletions terraform/application-insights/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- BEGIN_TF_DOCS -->
## Resources

| Name | Type |
|------|------|
| [azurerm_application_insights.adl_appi](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_insights) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_application_type"></a> [application\_type](#input\_application\_type) | Specifies the type of Application Insights to create. | `string` | `"web"` | no |
| <a name="input_basename"></a> [basename](#input\_basename) | Basename of the module. | `string` | n/a | yes |
| <a name="input_internet_ingestion_enabled"></a> [internet\_ingestion\_enabled](#input\_internet\_ingestion\_enabled) | Should the Application Insights component support ingestion over the Public Internet? | `bool` | `false` | no |
| <a name="input_internet_query_enabled"></a> [internet\_query\_enabled](#input\_internet\_query\_enabled) | Should the Application Insights component support querying over the Public Internet? | `bool` | `false` | no |
| <a name="input_location"></a> [location](#input\_location) | Location of the resource group. | `string` | n/a | yes |
| <a name="input_module_enabled"></a> [module\_enabled](#input\_module\_enabled) | Variable to enable or disable the module. | `bool` | `true` | no |
| <a name="input_rg_name"></a> [rg\_name](#input\_rg\_name) | Resource group name. | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags which should be assigned to the deployed resource. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_id"></a> [id](#output\_id) | n/a |
| <a name="output_instrumentation_key"></a> [instrumentation\_key](#output\_instrumentation\_key) | n/a |
| <a name="output_name"></a> [name](#output\_name) | n/a |
| <a name="output_resource_group_name"></a> [resource\_group\_name](#output\_resource\_group\_name) | n/a |
<!-- END_TF_DOCS -->

0 comments on commit 2c624f2

Please sign in to comment.