diff --git a/.github/actions/run-terraform-docs/action.yml b/.github/actions/run-terraform-docs/action.yml new file mode 100644 index 00000000..84a34a5f --- /dev/null +++ b/.github/actions/run-terraform-docs/action.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/application-insights.yml b/.github/workflows/application-insights.yml index 20568af4..28c9911e 100644 --- a/.github/workflows/application-insights.yml +++ b/.github/workflows/application-insights.yml @@ -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 }}" \ No newline at end of file + 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 \ No newline at end of file diff --git a/terraform/application-insights/README.md b/terraform/application-insights/README.md new file mode 100644 index 00000000..7c61d416 --- /dev/null +++ b/terraform/application-insights/README.md @@ -0,0 +1,29 @@ + +## 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 | +|------|-------------|------|---------|:--------:| +| [application\_type](#input\_application\_type) | Specifies the type of Application Insights to create. | `string` | `"web"` | no | +| [basename](#input\_basename) | Basename of the module. | `string` | n/a | yes | +| [internet\_ingestion\_enabled](#input\_internet\_ingestion\_enabled) | Should the Application Insights component support ingestion over the Public Internet? | `bool` | `false` | no | +| [internet\_query\_enabled](#input\_internet\_query\_enabled) | Should the Application Insights component support querying over the Public Internet? | `bool` | `false` | no | +| [location](#input\_location) | Location of the resource group. | `string` | n/a | yes | +| [module\_enabled](#input\_module\_enabled) | Variable to enable or disable the module. | `bool` | `true` | no | +| [rg\_name](#input\_rg\_name) | Resource group name. | `string` | n/a | yes | +| [tags](#input\_tags) | A mapping of tags which should be assigned to the deployed resource. | `map(string)` | `{}` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [id](#output\_id) | n/a | +| [instrumentation\_key](#output\_instrumentation\_key) | n/a | +| [name](#output\_name) | n/a | +| [resource\_group\_name](#output\_resource\_group\_name) | n/a | + \ No newline at end of file