Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0fce5f8
Bump github.com/zclconf/go-cty from 1.14.4 to 1.15.0 (#392)
dependabot[bot] Jul 16, 2024
7e9af8a
Result of tsccr-helper -log-level=info gha update -latest . (#394)
hashicorp-tsccr[bot] Jul 23, 2024
ed88ed9
Bump github.com/hashicorp/hc-install from 0.7.0 to 0.8.0 (#395)
dependabot[bot] Aug 1, 2024
5822f03
Bump golang.org/x/text from 0.16.0 to 0.17.0 (#396)
dependabot[bot] Aug 6, 2024
3b395d1
Result of tsccr-helper -log-level=info gha update -latest . (#397)
hashicorp-tsccr[bot] Aug 13, 2024
0181212
Bump golang.org/x/text from 0.17.0 to 0.18.0 (#399)
dependabot[bot] Sep 6, 2024
0fc3fa6
all: Bump minimum Go module version to 1.22 (#400)
austinvalle Sep 9, 2024
bfe7545
Bump github.com/hashicorp/hc-install from 0.8.0 to 0.8.1 (#401)
dependabot[bot] Sep 11, 2024
dc14319
Bump github.com/hashicorp/hc-install from 0.8.1 to 0.9.0 (#402)
dependabot[bot] Sep 12, 2024
a0a9ecf
[CI] Update lock workflow file
hc-github-team-tf-provider-devex Sep 16, 2024
34b25a9
Bump github.com/rogpeppe/go-internal from 1.12.0 to 1.13.1 (#403)
dependabot[bot] Sep 25, 2024
877b106
Result of tsccr-helper -log-level=info gha update -latest . (#406)
hashicorp-tsccr[bot] Oct 7, 2024
b9c099a
Bump golang.org/x/text from 0.18.0 to 0.19.0 (#405)
dependabot[bot] Oct 7, 2024
2922a8d
Bump github.com/bmatcuk/doublestar/v4 from 4.6.1 to 4.7.1 (#407)
dependabot[bot] Oct 14, 2024
13e768a
Result of tsccr-helper -log-level=info gha update -latest . (#408)
hashicorp-tsccr[bot] Oct 14, 2024
d7b832f
Bump github.com/yuin/goldmark from 1.7.4 to 1.7.7 (#410)
dependabot[bot] Oct 15, 2024
c91b0d1
Result of tsccr-helper -log-level=info gha update -latest . (#412)
hashicorp-tsccr[bot] Oct 22, 2024
972ae8f
Bump github.com/hashicorp/terraform-json from 0.22.1 to 0.23.0 (#414)
dependabot[bot] Oct 30, 2024
50a9359
Validate: refactor internal methods to use `fs.FS` interface for file…
SBGoods Oct 31, 2024
9564c49
all: add support for ephemeral resources (#415)
SBGoods Nov 1, 2024
1913400
Result of tsccr-helper -log-level=info gha update -latest .github/ (#…
hashicorp-tsccr[bot] Nov 4, 2024
02bc375
Bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 in /tools (#417)
dependabot[bot] Nov 5, 2024
377d8f6
Update changelog
hc-github-team-tf-provider-devex Nov 6, 2024
9d0e89b
Fix up ephemeral resource generation against Hugo's patches
strideynet Jul 8, 2025
b41d5ec
Fix up tests
strideynet Jul 8, 2025
5bcef51
Appease linter
strideynet Jul 8, 2025
d50acb6
Fix broken golangcilint
strideynet Jul 8, 2025
b63570d
Add Ephemeral Resource files to the doc template
strideynet Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changes/0.20.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## 0.20.0 (November 06, 2024)

NOTES:

* all: This Go module has been updated to Go 1.22 per the [Go support policy](https://go.dev/doc/devel/release#policy). It is recommended to review the [Go 1.22 release notes](https://go.dev/doc/go1.22) before upgrading. Any consumers building on earlier Go versions may experience errors. ([#400](https://github.com/hashicorp/terraform-plugin-docs/issues/400))

FEATURES:

* generate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))
* migrate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))
* validate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))

BUG FIXES:

* validate: File extension check now runs on `index.*` files instead of just `index.md` files. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))
* validate: File extension check now specifies the correct valid extensions in the error message. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))
* validate: Front matter check now runs with the correct options on legacy index files. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))

2 changes: 1 addition & 1 deletion .github/workflows/ci-changie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Ensure terraform-devex-repos is updated on version changes.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Ensure terraform-devex-repos is updated on version changes.
- uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- run: copywrite headers --plan
- run: copywrite license --plan
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Avoid persisting GITHUB_TOKEN credentials as they take priority over our service account PAT for `git push` operations
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job,
Expand All @@ -79,12 +79,12 @@ jobs:
contents: write # Needed for goreleaser to create GitHub release
issues: write # Needed for goreleaser to close associated milestone
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.versionNumber }}
fetch-depth: 0

- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
git config --global core.eol lf

- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
- name: Run linters
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: latest
args: --timeout=3m
Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,20 @@ linters:
enable:
- durationcheck
- errcheck
- exportloopref
- forcetypeassert
- gofmt
- gosimple
- govet
- ineffassign
- makezero
- misspell
- nilerr
- paralleltest
- predeclared
- staticcheck
- tenv
- unconvert
- unparam
- unused
- vet

run:
# Prevent false positive timeouts in CI
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.20.0 (November 06, 2024)

NOTES:

* all: This Go module has been updated to Go 1.22 per the [Go support policy](https://go.dev/doc/devel/release#policy). It is recommended to review the [Go 1.22 release notes](https://go.dev/doc/go1.22) before upgrading. Any consumers building on earlier Go versions may experience errors. ([#400](https://github.com/hashicorp/terraform-plugin-docs/issues/400))

FEATURES:

* generate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))
* migrate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))
* validate: Add support for ephemeral resources ([#415](https://github.com/hashicorp/terraform-plugin-docs/issues/415))

BUG FIXES:

* validate: File extension check now runs on `index.*` files instead of just `index.md` files. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))
* validate: File extension check now specifies the correct valid extensions in the error message. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))
* validate: Front matter check now runs with the correct options on legacy index files. ([#413](https://github.com/hashicorp/terraform-plugin-docs/issues/413))

## 0.19.4 (June 04, 2024)

NOTES:
Expand Down
76 changes: 41 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ When you run `tfplugindocs`, by default from the root directory of a provider co
* Generate resource template files, if missing
* Generate data source template files, if missing
* Generate function template files, if missing (Requires Terraform v1.8.0+)
* Generate ephemeral resource template files, if missing (Requires Terraform v1.10.0+)
* Copy all non-template files to the output website directory
* Process all the remaining templates to generate files for the output website directory

Expand Down Expand Up @@ -193,16 +194,18 @@ For templates:

> **NOTE:** In the following conventional paths for templates, `<data source name>`, `<resource name>`, and `<function name>` do not include the provider prefix.

| Path | Description |
|-------------------------------------------------------|----------------------------------------|
| `templates/` | Root of templated docs |
| `templates/index.md[.tmpl]` | Docs index page (or template) |
| `templates/data-sources.md[.tmpl]` | Generic data source page (or template) |
| `templates/data-sources/<data source name>.md[.tmpl]` | Data source page (or template) |
| `templates/functions.md[.tmpl]` | Generic function page (or template) |
| `templates/functions/<function name>.md[.tmpl]` | Function page (or template) |
| `templates/resources.md[.tmpl]` | Generic resource page (or template) |
| `templates/resources/<resource name>.md[.tmpl]` | Resource page (or template) |
| Path | Description |
|--------------------------------------------------------------------|-----------------------------------------------|
| `templates/` | Root of templated docs |
| `templates/index.md[.tmpl]` | Docs index page (or template) |
| `templates/data-sources.md[.tmpl]` | Generic data source page (or template) |
| `templates/data-sources/<data source name>.md[.tmpl]` | Data source page (or template) |
| `templates/ephemeral-resources.md[.tmpl]` | Generic ephemeral resource page (or template) |
| `templates/ephemeral-resources/<ephemeral resource name>.md[.tmpl]` | Ephemeral resource page (or template) |
| `templates/functions.md[.tmpl]` | Generic function page (or template) |
| `templates/functions/<function name>.md[.tmpl]` | Function page (or template) |
| `templates/resources.md[.tmpl]` | Generic resource page (or template) |
| `templates/resources/<resource name>.md[.tmpl]` | Resource page (or template) |

Note: the `.tmpl` extension is necessary, for the file to be correctly handled as a template.

Expand All @@ -211,14 +214,15 @@ For examples:
> **NOTE:** In the following conventional paths for examples, `<data source name>` and `<resource name>` include the provider prefix as well, but the provider prefix is **NOT** included in`<function name>`.
> For example, the data source [`caller_identity`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) in the `aws` provider would have an "example" conventional path of: `examples/data-sources/aws_caller_identity/data-source.tf`

| Path | Description |
|-----------------------------------------------------------|---------------------------------|
| `examples/` | Root of examples |
| `examples/provider/provider.tf` | Provider example config |
| `examples/data-sources/<data source name>/data-source.tf` | Data source example config |
| `examples/functions/<function name>/function.tf` | Function example config |
| `examples/resources/<resource name>/resource.tf` | Resource example config |
| `examples/resources/<resource name>/import.sh` | Resource example import command |
| Path | Description |
|---------------------------------------------------------------------------|-----------------------------------|
| `examples/` | Root of examples |
| `examples/provider/provider.tf` | Provider example config |
| `examples/data-sources/<data source name>/data-source.tf` | Data source example config |
| `examples/ephemeral-resources/<ephemeral resource>/ephemeral-resource.tf` | Ephemeral resource example config |
| `examples/functions/<function name>/function.tf` | Function example config |
| `examples/resources/<resource name>/resource.tf` | Resource example config |
| `examples/resources/<resource name>/import.sh` | Resource example import command |

#### Migration

Expand All @@ -229,25 +233,27 @@ The `migrate` subcommand assumes the following conventional paths for the render

Legacy website directory structure:

| Path | Description |
|-------------------------------------------------------|-----------------------------|
| `website/` | Root of website docs |
| `website/docs/guides` | Root of guides subdirectory |
| `website/docs/index.html.markdown` | Docs index page |
| `website/docs/d/<data source name>.html.markdown` | Data source page |
| `website/docs/functons/<function name>.html.markdown` | Functions page |
| `website/docs/r/<resource name>.html.markdown` | Resource page |
| Path | Description |
|----------------------------------------------------------------------------|-----------------------------|
| `website/` | Root of website docs |
| `website/docs/guides` | Root of guides subdirectory |
| `website/docs/index.html.markdown` | Docs index page |
| `website/docs/d/<data source name>.html.markdown` | Data source page |
| `website/docs/ephemeral-resources/<ephemeral resource name>.html.markdown` | Ephemeral resource page |
| `website/docs/functons/<function name>.html.markdown` | Functions page |
| `website/docs/r/<resource name>.html.markdown` | Resource page |

Docs website directory structure:

| Path | Description |
|------------------------------------------------------|-----------------------------|
| `docs/` | Root of website docs |
| `docs/guides` | Root of guides subdirectory |
| `docs/index.html.markdown` | Docs index page |
| `docs/data-sources/<data source name>.html.markdown` | Data source page |
| `docs/functions/<function name>.html.markdown` | Function page |
| `docs/resources/<resource name>.html.markdown` | Resource page |
| Path | Description |
|--------------------------------------------------------------------|-----------------------------|
| `docs/` | Root of website docs |
| `docs/guides` | Root of guides subdirectory |
| `docs/index.html.markdown` | Docs index page |
| `docs/data-sources/<data source name>.html.markdown` | Data source page |
| `docs/ephemeral-resources/<ephemeral resource name>.html.markdown` | Ephemeral resource page |
| `docs/functions/<function name>.html.markdown` | Function page |
| `docs/resources/<resource name>.html.markdown` | Resource page |

Files named `index` (before the first `.`) in the website docs root directory and files in the `website/docs/d/`, `website/docs/r/`, `docs/data-sources/`,
and `docs/resources/` subdirectories will be converted to `tfplugindocs` templates.
Expand Down Expand Up @@ -275,7 +281,7 @@ using the following data fields and functions:
| `.RenderedProviderName` | string | Value provided via argument `--rendered-provider-name`, otherwise same as `.ProviderName` |
| `.SchemaMarkdown` | string | a Markdown formatted Provider Schema definition |

##### Resources / Data Source Fields
##### Managed Resource / Ephemeral Resource / Data Source Fields

| Field | Type | Description |
|------------------------:|:------:|-------------------------------------------------------------------------------------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ resource "scaffolding_example" fallback template exists, creating template
generating missing data source content
data-source "scaffolding_example" fallback template exists, creating template
generating missing function content
generating missing ephemeral resource content
generating missing provider content
provider "terraform-provider-scaffolding" template exists, skipping
rendering static website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ resource "scaffolding_example" template exists, skipping
generating missing data source content
data-source "scaffolding_example" template exists, skipping
generating missing function content
generating missing ephemeral resource content
generating missing provider content
provider "terraform-provider-scaffolding" template exists, skipping
rendering static website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ generating new template for "scaffolding_example"
generating missing data source content
generating new template for data-source "scaffolding_example"
generating missing function content
generating missing ephemeral resource content
generating missing provider content
generating new template for "terraform-provider-scaffolding"
rendering static website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ resource "null_resource" fallback template exists, creating template
generating missing data source content
data-source "null_data_source" fallback template exists, creating template
generating missing function content
generating missing ephemeral resource content
generating missing provider content
provider "terraform-provider-null" template exists, skipping
rendering static website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ generating new template for "scaffolding_example"
generating missing data source content
generating missing function content
generating new template for function "scaffolding"
generating missing ephemeral resource content
generating missing provider content
generating new template for "terraform-provider-scaffolding"
rendering static website
Expand Down
Loading
Loading