Skip to content

Commit fef4035

Browse files
committed
Use 'latest' as resource link if not a fixed version
If version contraints of required providers contain anything except of fixed version (e.g. '1.2.3', or '= 1.2.3'), there's no way to extract the actual intended version while being offline and solely by looking at the terraform files, as such if such a version was provided we're going to fall back to 'latest' as part of resource URL. The link, unfortunately, will not be 100% accurate all the times. For example constraint might be '>= 1.2.3, < 2.0.0' but the latest version of said resource is at 3.x. But the silver lining is that the generated link is never broken. Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
1 parent 889f8bd commit fef4035

File tree

181 files changed

+280
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+280
-193
lines changed

docs/FORMATS_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ terraform-docs [PATH] [flags]
4444
* [terraform-docs xml](/docs/formats/xml.md) - Generate XML of inputs and outputs
4545
* [terraform-docs yaml](/docs/formats/yaml.md) - Generate YAML of inputs and outputs
4646

47-
###### Auto generated by spf13/cobra on 9-Feb-2021
47+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/asciidoc-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ generates the following output:
131131

132132
The following resources are used by this module:
133133

134-
- https://registry.terraform.io/providers/hashicorp/aws/2.15.0/docs/data-sources/caller_identity[aws_caller_identity]
134+
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity]
135135
- https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource]
136136
- https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key[tls_private_key]
137137

@@ -456,4 +456,4 @@ generates the following output:
456456

457457
Description: It's unquoted output.
458458

459-
###### Auto generated by spf13/cobra on 9-Feb-2021
459+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/asciidoc-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ generates the following output:
119119
[cols="a",options="header,autowidth"]
120120
|===
121121
|Name
122-
|https://registry.terraform.io/providers/hashicorp/aws/2.15.0/docs/data-sources/caller_identity[aws_caller_identity]
122+
|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity]
123123
|https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource]
124124
|https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key[tls_private_key]
125125
|===
@@ -400,4 +400,4 @@ generates the following output:
400400
|unquoted |It's unquoted output.
401401
|===
402402

403-
###### Auto generated by spf13/cobra on 9-Feb-2021
403+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/asciidoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ terraform-docs asciidoc [PATH] [flags]
4040
* [terraform-docs asciidoc document](/docs/formats/asciidoc-document.md) - Generate AsciiDoc document of inputs and outputs
4141
* [terraform-docs asciidoc table](/docs/formats/asciidoc-table.md) - Generate AsciiDoc tables of inputs and outputs
4242

43-
###### Auto generated by spf13/cobra on 9-Feb-2021
43+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ generates the following output:
366366
"providerName": "aws",
367367
"provicerSource": "hashicorp/aws",
368368
"mode": "data",
369-
"version": "2.15.0"
369+
"version": "latest"
370370
},
371371
{
372372
"type": "resource",
@@ -385,4 +385,4 @@ generates the following output:
385385
]
386386
}
387387

388-
###### Auto generated by spf13/cobra on 9-Feb-2021
388+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/markdown-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ generates the following output:
132132

133133
The following resources are used by this module:
134134

135-
- [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/2.15.0/docs/data-sources/caller_identity)
135+
- [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
136136
- [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource)
137137
- [tls_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key)
138138

@@ -457,4 +457,4 @@ generates the following output:
457457

458458
Description: It's unquoted output.
459459

460-
###### Auto generated by spf13/cobra on 9-Feb-2021
460+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/markdown-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ generates the following output:
113113

114114
| Name |
115115
|------|
116-
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/2.15.0/docs/data-sources/caller_identity) |
116+
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) |
117117
| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) |
118118
| [tls_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) |
119119

@@ -162,4 +162,4 @@ generates the following output:
162162
| output-2 | It's output number two. |
163163
| unquoted | It's unquoted output. |
164164

165-
###### Auto generated by spf13/cobra on 9-Feb-2021
165+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/markdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ terraform-docs markdown [PATH] [flags]
4141
* [terraform-docs markdown document](/docs/formats/markdown-document.md) - Generate Markdown document of inputs and outputs
4242
* [terraform-docs markdown table](/docs/formats/markdown-table.md) - Generate Markdown tables of inputs and outputs
4343

44-
###### Auto generated by spf13/cobra on 9-Feb-2021
44+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/pretty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ generates the following output:
9898
modulecall.foo (bar,1.2.3)
9999

100100

101-
resource.aws_caller_identity (https://registry.terraform.io/providers/hashicorp/aws/2.15.0/docs/data-sources/caller_identity)
101+
resource.aws_caller_identity (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
102102
resource.null_resource (https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource)
103103
resource.tls_private_key (https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key)
104104

@@ -242,4 +242,4 @@ generates the following output:
242242
output.unquoted
243243
It's unquoted output.
244244

245-
###### Auto generated by spf13/cobra on 9-Feb-2021
245+
###### Auto generated by spf13/cobra on 22-Feb-2021

docs/formats/tfvars-hcl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ generates the following output:
9999
unquoted = ""
100100
with-url = ""
101101

102-
###### Auto generated by spf13/cobra on 9-Feb-2021
102+
###### Auto generated by spf13/cobra on 22-Feb-2021

0 commit comments

Comments
 (0)