Skip to content

Commit 0504a4e

Browse files
authored
Generate readme for submodules (#66)
1 parent c69c17b commit 0504a4e

File tree

4 files changed

+164
-2
lines changed

4 files changed

+164
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
**
1919
** This file was automatically generated by the `cloudposse/build-harness`.
2020
** 1) Make all changes to `README.yaml`
21-
** 2) Run `make init` (you only need to do this once)
22-
** 3) Run`make readme` to rebuild this file.
21+
** 2) Install [atmos](https://atmos.tools/install/) (you only need to do this once)
22+
** 3) Run`atmos readme` to rebuild this file.
2323
**
2424
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
2525
**

atmos.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,68 @@
1010
# Import shared configuration used by all modules
1111
import:
1212
- https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml
13+
14+
docs:
15+
generate:
16+
readme-submodule-subnet-route:
17+
base-dir: ./
18+
input:
19+
- readme: "./modules/subnet_route/README.md"
20+
- get_support: true
21+
template: "https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/atmos.README.md.submodule.gotmpl"
22+
output: "./modules/subnet_route/README.md"
23+
terraform:
24+
source: ./modules/subnet_route
25+
enabled: true
26+
format: "markdown table"
27+
show_providers: false
28+
show_inputs: true
29+
show_outputs: true
30+
sort_by: "name"
31+
hide_empty: false
32+
indent_level: 2
33+
34+
readme-submodule-transit-gateway-route:
35+
base-dir: ./
36+
input:
37+
- readme: "./modules/transit_gateway_route/README.md"
38+
- get_support: true
39+
template: "https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/atmos.README.md.submodule.gotmpl"
40+
output: "./modules/transit_gateway_route/README.md"
41+
terraform:
42+
source: ./modules/transit_gateway_route
43+
enabled: true
44+
format: "markdown table"
45+
show_providers: false
46+
show_inputs: true
47+
show_outputs: true
48+
sort_by: "name"
49+
hide_empty: false
50+
indent_level: 2
51+
52+
53+
commands:
54+
- name: readme
55+
steps:
56+
- "atmos docs generate readme"
57+
- "atmos docs generate readme-submodule-subnet-route"
58+
- "atmos docs generate readme-submodule-transit-gateway-route"
59+
60+
- name: test
61+
commands:
62+
- name: "init"
63+
description: Initialize tests
64+
steps:
65+
- "make -C test/src init"
66+
67+
- name: "run"
68+
description: Run tests
69+
steps:
70+
- "cd test/src && go mod tidy"
71+
- "cd test/src && go test -v -timeout 60m"
72+
73+
- name: "clean"
74+
description: Clean tests
75+
steps:
76+
- "make -C test/src clean"
77+
- "rm -rf examples/*/.terraform examples/*/.terraform.lock.hcl"

modules/subnet_route/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Subnet route
2+
3+
4+
5+
6+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7+
<!-- markdownlint-disable -->
8+
## Requirements
9+
10+
| Name | Version |
11+
|------|---------|
12+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
13+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.69.0 |
14+
15+
## Providers
16+
17+
| Name | Version |
18+
|------|---------|
19+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.69.0 |
20+
21+
## Modules
22+
23+
No modules.
24+
25+
## Resources
26+
27+
| Name | Type |
28+
|------|------|
29+
| [aws_route.count](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
30+
| [aws_route.keys](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
31+
32+
## Inputs
33+
34+
| Name | Description | Type | Default | Required |
35+
|------|-------------|------|---------|:--------:|
36+
| <a name="input_destination_cidr_blocks"></a> [destination\_cidr\_blocks](#input\_destination\_cidr\_blocks) | Destination CIDR blocks | `list(string)` | n/a | yes |
37+
| <a name="input_route_keys_enabled"></a> [route\_keys\_enabled](#input\_route\_keys\_enabled) | Enable route keys | `bool` | `false` | no |
38+
| <a name="input_route_table_ids"></a> [route\_table\_ids](#input\_route\_table\_ids) | Subnet route table IDs | `list(string)` | n/a | yes |
39+
| <a name="input_route_timeouts"></a> [route\_timeouts](#input\_route\_timeouts) | aws\_route resource timeouts | <pre>object({<br/> create = optional(string),<br/> delete = optional(string),<br/> update = optional(string)<br/> })</pre> | `{}` | no |
40+
| <a name="input_transit_gateway_id"></a> [transit\_gateway\_id](#input\_transit\_gateway\_id) | Transit Gateway ID | `string` | n/a | yes |
41+
42+
## Outputs
43+
44+
| Name | Description |
45+
|------|-------------|
46+
| <a name="output_subnet_route_ids"></a> [subnet\_route\_ids](#output\_subnet\_route\_ids) | Subnet route identifiers combined with destinations |
47+
<!-- markdownlint-restore -->
48+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
49+
50+
51+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Transit gateway route
2+
3+
4+
5+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6+
<!-- markdownlint-disable -->
7+
## Requirements
8+
9+
| Name | Version |
10+
|------|---------|
11+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
12+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.69.0 |
13+
14+
## Providers
15+
16+
| Name | Version |
17+
|------|---------|
18+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.69.0 |
19+
20+
## Modules
21+
22+
No modules.
23+
24+
## Resources
25+
26+
| Name | Type |
27+
|------|------|
28+
| [aws_ec2_transit_gateway_route.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route) | resource |
29+
30+
## Inputs
31+
32+
| Name | Description | Type | Default | Required |
33+
|------|-------------|------|---------|:--------:|
34+
| <a name="input_route_config"></a> [route\_config](#input\_route\_config) | Route config | <pre>list(object({<br/> blackhole = bool<br/> destination_cidr_block = string<br/> }))</pre> | n/a | yes |
35+
| <a name="input_transit_gateway_attachment_id"></a> [transit\_gateway\_attachment\_id](#input\_transit\_gateway\_attachment\_id) | Transit Gateway VPC attachment ID | `string` | n/a | yes |
36+
| <a name="input_transit_gateway_route_table_id"></a> [transit\_gateway\_route\_table\_id](#input\_transit\_gateway\_route\_table\_id) | Transit Gateway route table ID | `string` | n/a | yes |
37+
38+
## Outputs
39+
40+
| Name | Description |
41+
|------|-------------|
42+
| <a name="output_transit_gateway_route_ids"></a> [transit\_gateway\_route\_ids](#output\_transit\_gateway\_route\_ids) | Transit Gateway route identifiers combined with destinations |
43+
<!-- markdownlint-restore -->
44+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
45+
46+

0 commit comments

Comments
 (0)