Skip to content

Commit 012abec

Browse files
authored
Merge pull request #8 from Think-Cube/patch-1
Patch 1
2 parents 50b92d9 + f51bd83 commit 012abec

File tree

5 files changed

+72
-87
lines changed

5 files changed

+72
-87
lines changed

.github/workflows/documentation.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Generate terraform docs
2+
on:
3+
- pull_request
4+
jobs:
5+
docs:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
with:
10+
ref: ${{ github.event.pull_request.head.ref }}
11+
- name: Render terraform docs inside the README.md and push changes back to PR branch
12+
uses: terraform-docs/[email protected]
13+
with:
14+
github-token: ${{ secrets.GH_TOKEN }}
15+
working-dir: .
16+
output-file: README.md
17+
output-method: replace
18+
config-file: .terraform-docs.yml
19+
git-push: "true"

.terraform-docs.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# .terraform-docs.yaml
2+
formatter: toml # this is required
3+
4+
version: ""
5+
6+
header-from: main.tf
7+
footer-from: "variables.tf"
8+
9+
10+
content: ""
11+
12+
output:
13+
file: README.md # output-file
14+
mode: replace
15+
template: |-
16+
<!-- BEGIN_TF_DOCS -->
17+
{{ .Content }}
18+
<!-- END_TF_DOCS -->
19+
20+
output-values:
21+
enabled: false
22+
from: ""
23+
24+
sort:
25+
enabled: true
26+
by: name
27+
28+
settings:
29+
anchor: true
30+
color: true
31+
default: true
32+
description: false
33+
escape: true
34+
hide-empty: true
35+
html: true
36+
indent: 4
37+
lockfile: true
38+
required: true
39+
sensitive: true
40+
type: true

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
<!-- BEGIN_TF_DOCS -->
2-
## Requirements
2+
#### Requirements
33

44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.4 |
7-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | 3.94.0 |
7+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | 3.100.0 |
88

9-
## Providers
9+
#### Providers
1010

1111
| Name | Version |
1212
|------|---------|
13-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.94.0 |
13+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.100.0 |
1414

15-
## Modules
16-
17-
No modules.
18-
19-
## Resources
15+
#### Resources
2016

2117
| Name | Type |
2218
|------|------|
23-
| [azurerm_route_table.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/resources/route_table) | resource |
24-
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/data-sources/client_config) | data source |
25-
| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/data-sources/resource_group) | data source |
19+
| [azurerm_route_table.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/resources/route_table) | resource |
20+
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/data-sources/client_config) | data source |
21+
| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/data-sources/resource_group) | data source |
2622

27-
## Inputs
23+
#### Inputs
2824

2925
| Name | Description | Type | Default | Required |
3026
|------|-------------|------|---------|:--------:|
@@ -37,7 +33,7 @@ No modules.
3733
| <a name="input_route_table_disable_bgp_route_propagation"></a> [route\_table\_disable\_bgp\_route\_propagation](#input\_route\_table\_disable\_bgp\_route\_propagation) | Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. | `bool` | `true` | no |
3834
| <a name="input_route_table_name"></a> [route\_table\_name](#input\_route\_table\_name) | The name of the route table. Changing this forces a new resource to be created. | `string` | n/a | yes |
3935

40-
## Outputs
36+
#### Outputs
4137

4238
| Name | Description |
4339
|------|-------------|

backend.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
terraform {
22
required_providers {
33
azurerm = {
4-
source = "hashicorp/azurerm"
5-
version = "3.94.0"
4+
source = "hashicorp/azurerm"
5+
version = "3.100.0"
66
}
77
}
88
required_version = ">= 1.6.4"
9-
}
9+
}

examples/route-table/README.md

-70
This file was deleted.

0 commit comments

Comments
 (0)