Skip to content

Commit 53d20b1

Browse files
authored
Merge pull request #27 from cytopia/release-0.14
Release 0.14
2 parents 135a9ed + 02a59b9 commit 53d20b1

20 files changed

+524
-170
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ env:
3232
- VERSION=0.4.5
3333
- VERSION=0.5.0
3434
- VERSION=0.6.0
35+
- VERSION=0.7.0
3536
- VERSION=latest
3637

3738

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ RUN set -x \
3030
&& sed -i'' 's/windows//g' Makefile \
3131
&& make \
3232
&& mv dist/terraform-docs_linux_amd64 /usr/local/bin/terraform-docs; \
33+
# Build terraform-docs 0.7.0
34+
elif [ "${VERSION}" = "0.7.0" ]; then \
35+
make test \
36+
&& make gox build-all GOOS=linux GOARCH=amd64 \
37+
&& mv bin/terraform-docs-0.7.0-linux-amd64 /usr/local/bin/terraform-docs; \
3338
# Build terraform-docs latest
3439
elif [ "${VERSION}" = "latest" ]; then \
3540
go get github.com/mitchellh/gox \

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _test-version:
5050
fi; \
5151
else \
5252
echo "Testing for tag: $(TAG)"; \
53-
if ! docker run --rm $(IMAGE) | grep -E "^v?$(TAG)$$"; then \
53+
if ! docker run --rm $(IMAGE) | grep -E "^(terraform-docs version)?\s?v?$(TAG)(\s.*)?$$"; then \
5454
echo "Failed"; \
5555
exit 1; \
5656
fi; \
@@ -83,12 +83,12 @@ _test-run-two:
8383
@echo "- Testing terraform-docs (2/2)"
8484
@echo "------------------------------------------------------------"
8585
$(eval TFDOC_ARG_SORT = $(shell \
86-
if [ "$(TAG)" = "latest" ] || [ "$(TAG)" = "0.6.0" ] || [ "$(TAG)" = "0.5.0" ]; then \
86+
if [ "$(TAG)" = "latest" ] || [ "$(TAG)" = "0.7.0" ] || [ "$(TAG)" = "0.6.0" ] || [ "$(TAG)" = "0.5.0" ]; then \
8787
echo "--sort-inputs-by-required"; \
8888
fi; \
8989
))
9090
$(eval TFDOC_ARG_AGGREGATE = $(shell \
91-
if [ "$(TAG)" = "latest" ] || [ "$(TAG)" = "0.6.0" ] || [ "$(TAG)" = "0.5.0" ] || [ "$(TAG)" = "0.4.5" ] || [ "$(TAG)" = "0.4.0" ]; then \
91+
if [ "$(TAG)" = "latest" ] || [ "$(TAG)" = "0.7.0" ] || [ "$(TAG)" = "0.6.0" ] || [ "$(TAG)" = "0.5.0" ] || [ "$(TAG)" = "0.4.5" ] || [ "$(TAG)" = "0.4.0" ]; then \
9292
echo "--with-aggregate-type-defaults"; \
9393
fi; \
9494
))

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
> [phplint][plint-git-lnk] ****
2727
> [php-cs-fixer][pcsf-git-lnk] ****
2828
> [pycodestyle][pycs-git-lnk] ****
29+
> [pydocstyle][pyds-git-lnk] ****
2930
> [pylint][pylint-git-lnk] ****
3031
> [terraform-docs][tfdocs-git-lnk] ****
3132
> [terragrunt][tg-git-lnk] ****
@@ -63,6 +64,7 @@ changes will be introduced).
6364
| Docker tag | Build from docker-terraform-docs | Build from terraform-docs |
6465
|------------|----------------------------------|---------------------------|
6566
| `latest` | [Branch: master](https://github.com/cytopia/docker-terraform-docs) | [Branch: master](https://github.com/segmentio/terraform-docs) |
67+
| `0.7.0` | [Branch: master](https://github.com/cytopia/docker-terraform-docs) | [Tag: v0.7.0](https://github.com/segmentio/terraform-docs/tree/v0.7.0) |
6668
| `0.6.0` | [Branch: master](https://github.com/cytopia/docker-terraform-docs) | [Tag: v0.6.0](https://github.com/segmentio/terraform-docs/tree/v0.6.0) |
6769
| `0.5.0` | [Branch: master](https://github.com/cytopia/docker-terraform-docs) | [Tag: v0.5.0](https://github.com/segmentio/terraform-docs/tree/v0.5.0) |
6870
| `0.4.5` | [Branch: master](https://github.com/cytopia/docker-terraform-docs) | [Tag: v0.4.5](https://github.com/segmentio/terraform-docs/tree/v0.4.5) |
@@ -80,6 +82,7 @@ you will have to take care yourself and update your CI tools every time a new ta
8082
| Docker tag | Build from docker-terraform-docs | Build from terraform-docs |
8183
|----------------|----------------------------------|---------------------------|
8284
| `latest-<tag>` | Tag: `<tag>` | [Branch: master](https://github.com/segmentio/terraform-docs) |
85+
| `0.7.0-<tag>` | Tag: `<tag>` | [Tag: v0.7.0](https://github.com/segmentio/terraform-docs/tree/v0.7.0) |
8386
| `0.6.0-<tag>` | Tag: `<tag>` | [Tag: v0.6.0](https://github.com/segmentio/terraform-docs/tree/v0.6.0) |
8487
| `0.5.0-<tag>` | Tag: `<tag>` | [Tag: v0.5.0](https://github.com/segmentio/terraform-docs/tree/v0.5.0) |
8588
| `0.4.5-<tag>` | Tag: `<tag>` | [Tag: v0.4.5](https://github.com/segmentio/terraform-docs/tree/v0.4.5) |
@@ -363,6 +366,7 @@ linter below for reproducible local or remote CI tests:
363366
| [php-cs-fixer][pcsf-git-lnk] | [![pcsf-hub-img]][pcsf-hub-lnk] | PHP | PHP Coding Standards Fixer |
364367
| [black][black-git-lnk] | [![black-hub-img]][black-hub-lnk] | Python | The uncompromising Python code formatter |
365368
| [pycodestyle][pycs-git-lnk] | [![pycs-hub-img]][pycs-hub-lnk] | Python | Python style guide checker |
369+
| [pydocstyle][pyds-git-lnk] | [![pyds-hub-img]][pyds-hub-lnk] | Python | Python docstyle checker |
366370
| [pylint][pylint-git-lnk] | [![pylint-hub-img]][pylint-hub-lnk] | Python | Python source code, bug and quality checker |
367371
| [terraform-docs][tfdocs-git-lnk] | [![tfdocs-hub-img]][tfdocs-hub-lnk] | Terraform | Terraform doc generator (TF 0.12 ready) **<sup>[1]</sup>** |
368372
| [terragrunt][tg-git-lnk] | [![tg-hub-img]][tg-hub-lnk] | Terraform | Terragrunt and Terraform |
@@ -436,6 +440,10 @@ linter below for reproducible local or remote CI tests:
436440
[pycs-hub-img]: https://img.shields.io/docker/pulls/cytopia/pycodestyle.svg
437441
[pycs-hub-lnk]: https://hub.docker.com/r/cytopia/pycodestyle
438442
443+
[pyds-git-lnk]: https://github.com/cytopia/docker-pydocstyle
444+
[pyds-hub-img]: https://img.shields.io/docker/pulls/cytopia/pydocstyle.svg
445+
[pyds-hub-lnk]: https://hub.docker.com/r/cytopia/pydocstyle
446+
439447
[pylint-git-lnk]: https://github.com/cytopia/docker-pylint
440448
[pylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/pylint.svg
441449
[pylint-hub-lnk]: https://hub.docker.com/r/cytopia/pylint

data/terraform-docs.awk

+16-1
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@
4848
blockDefaultCnt += gsub(/\(/, "")
4949
blockDefaultCnt += gsub(/\[/, "")
5050
blockDefaultCnt += gsub(/\{/, "")
51+
blockDefaultCnt += gsub(/\<\<EOF/, "")
5152
# Count closing blocks
5253
blockDefaultCnt -= gsub(/\)/, "")
5354
blockDefaultCnt -= gsub(/\]/, "")
5455
blockDefaultCnt -= gsub(/\}/, "")
56+
blockDefaultCnt -= gsub(/EOF/, "")
5557
}
5658
# [START] multiline "default" statement started
5759
if (blockCnt > 0 && blockTypeCnt == 0 && blockDefaultCnt == 0) {
@@ -64,10 +66,12 @@
6466
blockDefaultCnt += gsub(/\(/, "")
6567
blockDefaultCnt += gsub(/\[/, "")
6668
blockDefaultCnt += gsub(/\{/, "")
69+
blockDefaultCnt += gsub(/\<\<EOF/, "")
6770
# Count closing blocks
6871
blockDefaultCnt -= gsub(/\)/, "")
6972
blockDefaultCnt -= gsub(/\]/, "")
7073
blockDefaultCnt -= gsub(/\}/, "")
74+
blockDefaultCnt -= gsub(/EOF/, "")
7175
}
7276
}
7377
}
@@ -128,10 +132,21 @@
128132
# ----------------------------------------------------------------------------------------------
129133
# description = ...
130134
# ----------------------------------------------------------------------------------------------
131-
# [PRINT] single line "description"
135+
# [END] multiline "description" continues/ends
136+
if (blockCtn > 0 && blockTypeCnt == 0 && blockDefaultCnt == 0) {
137+
# Count opening blocks
138+
blockDefaultCnt += gsub(/\<\<EOF/, "")
139+
# Count closing blocks
140+
blockDefaultCnt -= gsub(/EOF/, "")
141+
}
142+
# [START] multiline "description" statement started
132143
if (blockCnt > 0 && blockTypeCnt == 0 && blockDefaultCnt == 0) {
133144
if ($0 ~ /^[[:space:]][[:space:]]*description[[:space:]][[:space:]]*=/) {
134145
print $0
146+
# Count opening blocks
147+
blockDefaultCnt += gsub(/\<\<EOF/, "")
148+
# Count closing blocks
149+
blockDefaultCnt -= gsub(/EOF/, "")
135150
}
136151
}
137152

tests/0.12/TEST-0.1.0.md

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ Stuff before terraform-docs
100100
| storage_encrypted | Specifies whether the DB instance is encrypted | `false` | no |
101101
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | `gp2` | no |
102102
| subnet_ids | A list of VPC subnet IDs | `<list>` | no |
103+
| subnetwork | This is a test | `This
104+
is
105+
a
106+
test
107+
` | no |
103108
| tags | A mapping of tags to assign to all resources | `<map>` | no |
104109
| test_var | This is a test variable | `` | no |
105110
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `<map>` | no |

tests/0.12/TEST-0.1.1.md

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ Stuff before terraform-docs
100100
| storage_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
101101
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
102102
| subnet_ids | A list of VPC subnet IDs | list(string) | `<list>` | no |
103+
| subnetwork | This is a test | string | `This
104+
is
105+
a
106+
test
107+
` | no |
103108
| tags | A mapping of tags to assign to all resources | map(string) | `<map>` | no |
104109
| test_var | This is a test variable | string | `` | no |
105110
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `<map>` | no |

tests/0.12/TEST-0.2.0.md

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ Stuff before terraform-docs
100100
| storage_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
101101
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
102102
| subnet_ids | A list of VPC subnet IDs | list(string) | `<list>` | no |
103+
| subnetwork | This is a test | string | `This
104+
is
105+
a
106+
test
107+
` | no |
103108
| tags | A mapping of tags to assign to all resources | map(string) | `<map>` | no |
104109
| test_var | This is a test variable | string | `` | no |
105110
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `<map>` | no |

tests/0.12/TEST-0.3.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Stuff before terraform-docs
100100
| storage_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
101101
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
102102
| subnet_ids | A list of VPC subnet IDs | list(string) | `<list>` | no |
103+
| subnetwork | This is a test | string | `This is a test ` | no |
103104
| tags | A mapping of tags to assign to all resources | map(string) | `<map>` | no |
104105
| test_var | This is a test variable | string | `` | no |
105106
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `<map>` | no |

tests/0.12/TEST-0.4.0.md

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ Stuff before terraform-docs
100100
| storage_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
101101
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
102102
| subnet_ids | A list of VPC subnet IDs | list(string) | `[]` | no |
103+
| subnetwork | This is a test | string | `This
104+
is
105+
a
106+
test
107+
` | no |
103108
| tags | A mapping of tags to assign to all resources | map(string) | `{}` | no |
104109
| test_var | This is a test variable | string | `` | no |
105110
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `{ "create": "40m", "delete": "40m", "update": "80m" }` | no |

tests/0.12/TEST-0.4.5.md

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ Stuff before terraform-docs
9999
| storage_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
100100
| storage_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
101101
| subnet_ids | A list of VPC subnet IDs | list(string) | `[]` | no |
102+
| subnetwork | This is a test | string | `This
103+
is
104+
a
105+
test
106+
` | no |
102107
| tags | A mapping of tags to assign to all resources | map(string) | `{}` | no |
103108
| test_var | This is a test variable | string | `` | no |
104109
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `{ "create": "40m", "delete": "40m", "update": "80m" }` | no |

tests/0.12/TEST-0.5.0.md

+5
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ Stuff before terraform-docs
101101
| storage\_encrypted | Specifies whether the DB instance is encrypted | bool | `false` | no |
102102
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `gp2` | no |
103103
| subnet\_ids | A list of VPC subnet IDs | list(string) | `[]` | no |
104+
| subnetwork | This is a test | string | `This
105+
is
106+
a
107+
test
108+
` | no |
104109
| tags | A mapping of tags to assign to all resources | map(string) | `{}` | no |
105110
| test\_var | This is a test variable | string | `` | no |
106111
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `{ "create": "40m", "delete": "40m", "update": "80m" }` | no |

tests/0.12/TEST-0.6.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Stuff before terraform-docs
101101
| storage\_encrypted | Specifies whether the DB instance is encrypted | bool | `"false"` | no |
102102
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'. | string | `"gp2"` | no |
103103
| subnet\_ids | A list of VPC subnet IDs | list(string) | `[]` | no |
104+
| subnetwork | This is a test | string | `"This\nis\na\ntest\n"` | no |
104105
| tags | A mapping of tags to assign to all resources | map(string) | `{}` | no |
105106
| test\_var | This is a test variable | string | `""` | no |
106107
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | map(string) | `{ "create": "40m", "delete": "40m", "update": "80m" }` | no |

0 commit comments

Comments
 (0)