Skip to content

Commit 1a70d4e

Browse files
authored
Merge pull request #34 from terraform-docs/yq
Move to yq v4 syntax
2 parents be0272d + a14499d commit 1a70d4e

File tree

3 files changed

+39
-42
lines changed

3 files changed

+39
-42
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
ref: ${{github.event.pull_request.head.ref}}
1616
repository: ${{github.event.pull_request.head.repo.full_name}}
1717

18+
- name: Build Docker image
19+
run: docker build --pull --tag quay.io/terraform-docs/gh-actions:edge .
20+
1821
- name: Should generate USAGE.md for tf11_basic
1922
uses: ./
2023
with:

examples/tf12_atlantis/README.md

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,39 @@
2020
## Usage
2121
2222
<!--- BEGIN_TF_DOCS --->
23-
### Requirements
24-
25-
| Name | Version |
26-
|------|---------|
27-
| aws | ~> 2.20.0 |
28-
| consul | >= 2.4.0 |
29-
30-
### Providers
31-
32-
| Name | Version |
33-
|------|---------|
34-
| aws | ~> 2.20.0 |
35-
| consul | >= 2.4.0 |
36-
37-
### Modules
38-
39-
No Modules.
40-
41-
### Resources
42-
43-
| Name |
44-
|------|
45-
| [aws_acm_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/acm_certificate) |
46-
| [consul_key](https://registry.terraform.io/providers/hashicorp/consul/latest/docs/data-sources/key) |
47-
48-
### Inputs
49-
50-
| Name | Description | Type | Default | Required |
51-
|------|-------------|------|---------|:--------:|
52-
| extra\_environment | List of additional environment variables | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | `[]` | no |
53-
| extra\_tags | Additional tags | `map(string)` | `{}` | no |
54-
| instance\_count | Number of instances to create | `number` | `1` | no |
55-
| instance\_name | Instance name prefix | `string` | `"test-"` | no |
56-
| subnet\_ids | A list of subnet ids to use | `list(string)` | n/a | yes |
57-
| vpc\_id | The id of the vpc | `string` | n/a | yes |
58-
59-
### Outputs
60-
61-
| Name | Description |
62-
|------|-------------|
63-
| vpc\_id | The Id of the VPC |
23+
### Requirements
24+
25+
| Name | Version |
26+
|------|---------|
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 2.20.0 |
28+
| <a name="requirement_consul"></a> [consul](#requirement\_consul) | >= 2.4.0 |
29+
30+
### Modules
31+
32+
No modules.
33+
34+
### Resources
35+
36+
| Name | Type |
37+
|------|------|
38+
| [aws_acm_certificate.test-cert](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/acm_certificate) | data source |
39+
| [consul_key.test](https://registry.terraform.io/providers/hashicorp/consul/latest/docs/data-sources/key) | data source |
40+
41+
### Inputs
42+
43+
| Name | Description | Type | Default | Required |
44+
|------|-------------|------|---------|:--------:|
45+
| <a name="input_extra_environment"></a> [extra\_environment](#input\_extra\_environment) | List of additional environment variables | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | `[]` | no |
46+
| <a name="input_extra_tags"></a> [extra\_tags](#input\_extra\_tags) | Additional tags | `map(string)` | `{}` | no |
47+
| <a name="input_instance_count"></a> [instance\_count](#input\_instance\_count) | Number of instances to create | `number` | `1` | no |
48+
| <a name="input_instance_name"></a> [instance\_name](#input\_instance\_name) | Instance name prefix | `string` | `"test-"` | no |
49+
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | A list of subnet ids to use | `list(string)` | n/a | yes |
50+
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The id of the vpc | `string` | n/a | yes |
51+
52+
### Outputs
53+
54+
| Name | Description |
55+
|------|-------------|
56+
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The Id of the VPC |
57+
6458
<!--- END_TF_DOCS --->

src/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ if [ -f "${GITHUB_WORKSPACE}/${ATLANTIS_FILE}" ]; then
177177
while read -r line; do
178178
project_dir=${line//- /}
179179
update_doc "${project_dir}"
180-
done < <(yq r "${GITHUB_WORKSPACE}/${ATLANTIS_FILE}" 'projects[*].dir') # NOTE(khos2ow): this is v3 specific syntax
180+
done < <(yq e '.projects[].dir' "${GITHUB_WORKSPACE}/${ATLANTIS_FILE}")
181181
elif [ -n "${FIND_DIR}" ] && [ "${FIND_DIR}" != "disabled" ]; then
182182
# Find all tf
183183
while read -r project_dir; do

0 commit comments

Comments
 (0)