Skip to content

Commit e4ae83e

Browse files
committed
Add terraform-docs 0.7.0
1 parent 5d7f6f4 commit e4ae83e

File tree

7 files changed

+255
-3
lines changed

7 files changed

+255
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ changes will be introduced).
6464
| Docker tag | Build from docker-terraform-docs | Build from terraform-docs |
6565
|------------|----------------------------------|---------------------------|
6666
| `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) |
6768
| `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) |
6869
| `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) |
6970
| `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) |
@@ -81,6 +82,7 @@ you will have to take care yourself and update your CI tools every time a new ta
8182
| Docker tag | Build from docker-terraform-docs | Build from terraform-docs |
8283
|----------------|----------------------------------|---------------------------|
8384
| `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) |
8486
| `0.6.0-<tag>` | Tag: `<tag>` | [Tag: v0.6.0](https://github.com/segmentio/terraform-docs/tree/v0.6.0) |
8587
| `0.5.0-<tag>` | Tag: `<tag>` | [Tag: v0.5.0](https://github.com/segmentio/terraform-docs/tree/v0.5.0) |
8688
| `0.4.5-<tag>` | Tag: `<tag>` | [Tag: v0.4.5](https://github.com/segmentio/terraform-docs/tree/v0.4.5) |

tests/0.12/TEST-0.7.0.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Test
2+
3+
Stuff before terraform-docs
4+
5+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6+
## Inputs
7+
8+
| Name | Description | Type | Default | Required |
9+
|------|-------------|:----:|:-----:|:-----:|
10+
| allocated\_storage | The allocated storage in gigabytes | string | n/a | yes |
11+
| backup\_window | The daily time range \(in UTC\) during which automated backups are created if they are enabled. Example: '09:46-10:16'. Must not overlap with maintenance\_window | string | n/a | yes |
12+
| engine | The database engine to use | string | n/a | yes |
13+
| engine\_version | The engine version to use | string | n/a | yes |
14+
| identifier | The name of the RDS instance, if omitted, Terraform will assign a random, unique identifier | string | n/a | yes |
15+
| instance\_class | The instance type of the RDS instance | string | n/a | yes |
16+
| maintenance\_window | The window to perform maintenance in. Syntax: 'ddd:hh24:mi-ddd:hh24:mi'. Eg: 'Mon:00:00-Mon:03:00' | string | n/a | yes |
17+
| name | Name of security group | string | n/a | yes |
18+
| password | Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file | string | n/a | yes |
19+
| port | The port on which the DB accepts connections | string | n/a | yes |
20+
| username | Username for the master DB user | string | n/a | yes |
21+
| vpc\_id | ID of the VPC where to create security group | string | n/a | yes |
22+
| allow\_major\_version\_upgrade | Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible | bool | `"false"` | no |
23+
| apply\_immediately | Specifies whether any database modifications are applied immediately, or during the next maintenance window | bool | `"false"` | no |
24+
| auto\_minor\_version\_upgrade | Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window | bool | `"true"` | no |
25+
| availability\_zone | The Availability Zone of the RDS instance | string | `""` | no |
26+
| backup\_retention\_period | The days to retain backups for | number | `"1"` | no |
27+
| character\_set\_name | \(Optional\) The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS for more information | string | `""` | no |
28+
| computed\_egress\_rules | List of computed egress rules to create by name | list(string) | `[]` | no |
29+
| computed\_egress\_with\_cidr\_blocks | List of computed egress rules to create where 'cidr\_blocks' is used | list(map(string)) | `[]` | no |
30+
| computed\_egress\_with\_ipv6\_cidr\_blocks | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | list(map(string)) | `[]` | no |
31+
| computed\_egress\_with\_self | List of computed egress rules to create where 'self' is defined | list(map(string)) | `[]` | no |
32+
| computed\_egress\_with\_source\_security\_group\_id | List of computed egress rules to create where 'source\_security\_group\_id' is used | list(map(string)) | `[]` | no |
33+
| computed\_ingress\_rules | List of computed ingress rules to create by name | list(string) | `[]` | no |
34+
| computed\_ingress\_with\_cidr\_blocks | List of computed ingress rules to create where 'cidr\_blocks' is used | list(map(string)) | `[]` | no |
35+
| computed\_ingress\_with\_ipv6\_cidr\_blocks | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | list(map(string)) | `[]` | no |
36+
| computed\_ingress\_with\_self | List of computed ingress rules to create where 'self' is defined | list(map(string)) | `[]` | no |
37+
| computed\_ingress\_with\_source\_security\_group\_id | List of computed ingress rules to create where 'source\_security\_group\_id' is used | list(map(string)) | `[]` | no |
38+
| copy\_tags\_to\_snapshot | On delete, copy all Instance tags to the final snapshot \(if final\_snapshot\_identifier is specified\) | bool | `"false"` | no |
39+
| create | Whether to create security group and all rules | bool | `"true"` | no |
40+
| create\_db\_instance | Whether to create a database instance | bool | `"true"` | no |
41+
| create\_db\_option\_group | Whether to create a database option group | bool | `"true"` | no |
42+
| create\_db\_parameter\_group | Whether to create a database parameter group | bool | `"true"` | no |
43+
| create\_db\_subnet\_group | Whether to create a database subnet group | bool | `"true"` | no |
44+
| create\_monitoring\_role | Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. | bool | `"false"` | no |
45+
| database\_outbound\_acl\_rules | Database subnets outbound network ACL rules | list(map(string)) | `[ { "cidr_block": "0.0.0.0/0", "from_port": 0, "protocol": "-1", "rule_action": "allow", "rule_number": 100, "to_port": 0 } ]` | no |
46+
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC | string | `""` | no |
47+
| deletion\_protection | The database can't be deleted when this value is set to true. | bool | `"false"` | no |
48+
| description | Description of security group | string | `"Security Group managed by Terraform"` | no |
49+
| egress\_cidr\_blocks | List of IPv4 CIDR ranges to use on all egress rules | list(string) | `[ "0.0.0.0/0" ]` | no |
50+
| egress\_ipv6\_cidr\_blocks | List of IPv6 CIDR ranges to use on all egress rules | list(string) | `[ "::/0" ]` | no |
51+
| egress\_prefix\_list\_ids | List of prefix list IDs \(for allowing access to VPC endpoints\) to use on all egress rules | list(string) | `[]` | no |
52+
| egress\_rules | List of egress rules to create by name | list(string) | `[]` | no |
53+
| egress\_with\_cidr\_blocks | List of egress rules to create where 'cidr\_blocks' is used | list(map(string)) | `[]` | no |
54+
| egress\_with\_ipv6\_cidr\_blocks | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | list(map(string)) | `[]` | no |
55+
| egress\_with\_self | List of egress rules to create where 'self' is defined | list(map(string)) | `[]` | no |
56+
| egress\_with\_source\_security\_group\_id | List of egress rules to create where 'source\_security\_group\_id' is used | list(map(string)) | `[]` | no |
57+
| enabled\_cloudwatch\_logs\_exports | List of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values \(depending on engine\): alert, audit, error, general, listener, slowquery, trace, postgresql \(PostgreSQL\), upgrade \(PostgreSQL\). | list(string) | `[]` | no |
58+
| family | The family of the DB parameter group | string | `""` | no |
59+
| final\_snapshot\_identifier | The name of your final DB snapshot when this DB instance is deleted. | string | `"null"` | no |
60+
| iam\_database\_authentication\_enabled | Specifies whether or mappings of AWS Identity and Access Management \(IAM\) accounts to database accounts is enabled | bool | `"false"` | no |
61+
| ingress\_cidr\_blocks | Bzzzzz | list | `[ { "cidr_blocks": "10.0.0.0/32", "description": "SG", "from_port": 22, "protocol": "tcp", "to_port": 22 } ]` | no |
62+
| ingress\_cidr\_blocks | List of IPv4 CIDR ranges to use on all ingress rules | list(string) | `[]` | no |
63+
| ingress\_ipv6\_cidr\_blocks | List of IPv6 CIDR ranges to use on all ingress rules | list(string) | `[]` | no |
64+
| ingress\_prefix\_list\_ids | List of prefix list IDs \(for allowing access to VPC endpoints\) to use on all ingress rules | list(string) | `[]` | no |
65+
| ingress\_rules | List of ingress rules to create by name | list(string) | `[]` | no |
66+
| ingress\_with\_cidr\_blocks | List of ingress rules to create where 'cidr\_blocks' is used | list(map(string)) | `[]` | no |
67+
| ingress\_with\_ipv6\_cidr\_blocks | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | list(map(string)) | `[]` | no |
68+
| ingress\_with\_self | List of ingress rules to create where 'self' is defined | list(map(string)) | `[]` | no |
69+
| ingress\_with\_source\_security\_group\_id | List of ingress rules to create where 'source\_security\_group\_id' is used | list(map(string)) | `[]` | no |
70+
| iops | The amount of provisioned IOPS. Setting this implies a storage\_type of 'io1' | number | `"0"` | no |
71+
| kms\_key\_id | The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN. If storage\_encrypted is set to true and kms\_key\_id is not specified the default KMS key created in your account will be used | string | `""` | no |
72+
| license\_model | License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1 | string | `""` | no |
73+
| major\_engine\_version | Specifies the major version of the engine that this option group should be associated with | string | `""` | no |
74+
| monitoring\_interval | The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. | number | `"0"` | no |
75+
| monitoring\_role\_arn | The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring\_interval is non-zero. | string | `""` | no |
76+
| monitoring\_role\_name | Name of the IAM role which will be created when create\_monitoring\_role is enabled. | string | `"rds-monitoring-role"` | no |
77+
| multi\_az | Specifies if the RDS instance is multi-AZ | bool | `"false"` | no |
78+
| name | The DB name to create. If omitted, no database is created initially | string | `""` | no |
79+
| network | The network | object | `{ "subnets": [ { "cidr_block": "10.0.0.0/16", "id": "vpc-123456" } ], "vpc": [ { "cidr_block": "10.0.0.0/16", "id": "vpc-123456" } ] }` | no |
80+
| number\_of\_computed\_egress\_rules | Number of computed egress rules to create by name | number | `"0"` | no |
81+
| number\_of\_computed\_egress\_with\_cidr\_blocks | Number of computed egress rules to create where 'cidr\_blocks' is used | number | `"0"` | no |
82+
| number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | number | `"0"` | no |
83+
| number\_of\_computed\_egress\_with\_self | Number of computed egress rules to create where 'self' is defined | number | `"0"` | no |
84+
| number\_of\_computed\_egress\_with\_source\_security\_group\_id | Number of computed egress rules to create where 'source\_security\_group\_id' is used | number | `"0"` | no |
85+
| number\_of\_computed\_ingress\_rules | Number of computed ingress rules to create by name | number | `"0"` | no |
86+
| number\_of\_computed\_ingress\_with\_cidr\_blocks | Number of computed ingress rules to create where 'cidr\_blocks' is used | number | `"0"` | no |
87+
| number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | number | `"0"` | no |
88+
| number\_of\_computed\_ingress\_with\_self | Number of computed ingress rules to create where 'self' is defined | number | `"0"` | no |
89+
| number\_of\_computed\_ingress\_with\_source\_security\_group\_id | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | number | `"0"` | no |
90+
| option\_group\_description | The description of the option group | string | `""` | no |
91+
| option\_group\_name | Name of the DB option group to associate. Setting this automatically disables option\_group creation | string | `""` | no |
92+
| options | A list of Options to apply. | any | `[]` | no |
93+
| override\_special | | string | `"%"` | no |
94+
| parameter\_group\_description | Description of the DB parameter group to create | string | `""` | no |
95+
| parameter\_group\_name | Name of the DB parameter group to associate or create | string | `""` | no |
96+
| parameters | A list of DB parameters \(map\) to apply | list(map(string)) | `[]` | no |
97+
| publicly\_accessible | Bool to control if instance is publicly accessible | bool | `"false"` | no |
98+
| replicate\_source\_db | Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate. | string | `""` | no |
99+
| skip\_final\_snapshot | Determines whether a final DB snapshot is created before the DB instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB snapshot is created before the DB instance is deleted, using the value from final\_snapshot\_identifier | bool | `"true"` | no |
100+
| snapshot\_identifier | Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05. | string | `""` | no |
101+
| storage\_encrypted | Specifies whether the DB instance is encrypted | bool | `"false"` | no |
102+
| 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 |
103+
| subnet\_ids | A list of VPC subnet IDs | list(string) | `[]` | no |
104+
| tags | A mapping of tags to assign to all resources | map(string) | `{}` | no |
105+
| test\_var | This is a test variable | string | `""` | no |
106+
| 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 |
107+
| timezone | \(Optional\) Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information. | string | `""` | no |
108+
| use\_name\_prefix | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | bool | `"true"` | no |
109+
| use\_parameter\_group\_name\_prefix | Whether to use the parameter group name prefix or not | bool | `"true"` | no |
110+
| vpc\_security\_group\_ids | List of VPC security groups to associate | list(string) | `[]` | no |
111+
112+
## Outputs
113+
114+
| Name | Description |
115+
|------|-------------|
116+
| environment | The output |
117+
| this\_db\_instance\_address | The address of the RDS instance |
118+
| this\_db\_instance\_arn | The ARN of the RDS instance |
119+
| this\_db\_instance\_availability\_zone | The availability zone of the RDS instance |
120+
| this\_db\_instance\_endpoint | The connection endpoint |
121+
| this\_db\_instance\_hosted\_zone\_id | The canonical hosted zone ID of the DB instance \(to be used in a Route 53 Alias record\) |
122+
| this\_db\_instance\_id | The RDS instance ID |
123+
| this\_db\_instance\_name | The database name |
124+
| this\_db\_instance\_password | The database password \(this password may be old, because Terraform doesn't track it after initial creation\) |
125+
| this\_db\_instance\_port | The database port |
126+
| this\_db\_instance\_resource\_id | The RDS Resource ID of this instance |
127+
| this\_db\_instance\_status | The RDS instance status |
128+
| this\_db\_instance\_username | The master username for the database |
129+
| this\_db\_option\_group\_arn | The ARN of the db option group |
130+
| this\_db\_option\_group\_id | The db option group id |
131+
| this\_db\_parameter\_group\_arn | The ARN of the db parameter group |
132+
| this\_db\_parameter\_group\_id | The db parameter group id |
133+
| this\_db\_subnet\_group\_arn | The ARN of the db subnet group |
134+
| this\_db\_subnet\_group\_id | The db subnet group name |
135+
| this\_security\_group\_description | The description of the security group |
136+
| this\_security\_group\_id | The ID of the security group |
137+
| this\_security\_group\_name | The name of the security group |
138+
| this\_security\_group\_owner\_id | The owner ID |
139+
| this\_security\_group\_vpc\_id | The VPC ID |
140+
141+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
142+
143+
Stuff after terraform-docs

tests/basic/TEST-0.7.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2+
## Inputs
3+
4+
| Name | Description | Type | Default | Required |
5+
|------|-------------|:----:|:-----:|:-----:|
6+
| test | test description | string | n/a | yes |
7+
8+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

0 commit comments

Comments
 (0)