Skip to content

Commit 4048b35

Browse files
committed
Merge branch 'main' into bflad/multiple-default-example-files
2 parents f5bebdc + a4a7122 commit 4048b35

45 files changed

Lines changed: 1616 additions & 45 deletions

Some content is hidden

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

.changes/0.23.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## 0.23.0 (September 17, 2025)
2+
3+
FEATURES:
4+
5+
* generate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
6+
* migrate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
7+
* validate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
8+

.github/workflows/ci-changie.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# Ensure terraform-devex-repos is updated on version changes.
2222
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2323
# Ensure terraform-devex-repos is updated on version changes.
24-
- uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
24+
- uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
2525
with:
2626
version: latest
2727
args: batch patch --dry-run

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
# More details: https://github.com/actions/checkout/blob/b4626ce19ce1106186ddf9bb20e706842f11a7c3/adrs/0153-checkout-v2.md#persist-credentials
3333
persist-credentials: false
3434
- name: Batch changes
35-
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
35+
uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
3636
with:
3737
version: latest
3838
args: batch ${{ needs.changelog-version.outputs.version }}
3939
- name: Merge changes
40-
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
40+
uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
4141
with:
4242
version: latest
4343
args: merge
@@ -84,7 +84,7 @@ jobs:
8484
ref: ${{ inputs.versionNumber }}
8585
fetch-depth: 0
8686

87-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
87+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
8888
with:
8989
go-version-file: 'go.mod'
9090

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Check out code
2424
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2525
- name: Setup Go
26-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
26+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
2727
with:
2828
go-version-file: 'go.mod'
2929
- name: Run linters

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.23.0 (September 17, 2025)
2+
3+
FEATURES:
4+
5+
* generate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
6+
* migrate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
7+
* validate: Add support for actions ([#505](https://github.com/hashicorp/terraform-plugin-docs/issues/505))
8+
19
## 0.22.0 (July 01, 2025)
210

311
BREAKING CHANGES:

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ When you run `tfplugindocs`, by default from the root directory of a provider co
117117
* Generate data source template files, if missing
118118
* Generate function template files, if missing (Requires Terraform v1.8.0+)
119119
* Generate ephemeral resource template files, if missing (Requires Terraform v1.10.0+)
120+
* Generate action template files, if missing (Requires Terraform v1.14.0+)
120121
* Copy all non-template files to the output website directory
121122
122123
> [!NOTE]
@@ -207,10 +208,12 @@ For templates:
207208
|--------------------------------------------------------------------|-----------------------------------------------|
208209
| `templates/` | Root of templated docs |
209210
| `templates/index.md[.tmpl]` | Docs index page (or template) |
211+
| `templates/actions.md[.tmpl]` | Generic action page (or template) |
212+
| `templates/actions/<action type name>.md[.tmpl]` | Action page (or template) |
210213
| `templates/data-sources.md[.tmpl]` | Generic data source page (or template) |
211214
| `templates/data-sources/<data source name>.md[.tmpl]` | Data source page (or template) |
212215
| `templates/ephemeral-resources.md[.tmpl]` | Generic ephemeral resource page (or template) |
213-
| `templates/ephemeral-resources/<ephemeral resource name>.md[.tmpl]` | Ephemeral resource page (or template) |
216+
| `templates/ephemeral-resources/<ephemeral resource name>.md[.tmpl]`| Ephemeral resource page (or template) |
214217
| `templates/functions.md[.tmpl]` | Generic function page (or template) |
215218
| `templates/functions/<function name>.md[.tmpl]` | Function page (or template) |
216219
| `templates/resources.md[.tmpl]` | Generic resource page (or template) |
@@ -227,6 +230,7 @@ For examples:
227230
|------------------------------------------------------------------------------|--------------------------------------------|
228231
| `examples/` | Root of examples |
229232
| `examples/provider/provider<*>.tf` | Provider example config(s) |
233+
| `examples/actions/<action_type>/action.tf` | Action example config |
230234
| `examples/data-sources/<data source name>/data-source<*>.tf` | Data source example config(s) |
231235
| `examples/ephemeral-resources/<ephemeral resource>/ephemeral-resource<*>.tf` | Ephemeral resource example config(s) |
232236
| `examples/functions/<function name>/function<*>.tf` | Function example config(s) |
@@ -249,6 +253,7 @@ Legacy website directory structure:
249253
| `website/` | Root of website docs |
250254
| `website/docs/guides` | Root of guides subdirectory |
251255
| `website/docs/index.html.markdown` | Docs index page |
256+
| `website/docs/actions/<action type name>.html.markdown` | Action page |
252257
| `website/docs/d/<data source name>.html.markdown` | Data source page |
253258
| `website/docs/ephemeral-resources/<ephemeral resource name>.html.markdown` | Ephemeral resource page |
254259
| `website/docs/functons/<function name>.html.markdown` | Functions page |
@@ -261,6 +266,7 @@ Docs website directory structure:
261266
| `docs/` | Root of website docs |
262267
| `docs/guides` | Root of guides subdirectory |
263268
| `docs/index.html.markdown` | Docs index page |
269+
| `docs/actions/<action type name>.html.markdown` | Action page |
264270
| `docs/data-sources/<data source name>.html.markdown` | Data source page |
265271
| `docs/ephemeral-resources/<ephemeral resource name>.html.markdown` | Ephemeral resource page |
266272
| `docs/functions/<function name>.html.markdown` | Function page |
@@ -337,6 +343,20 @@ using the following data fields and functions:
337343
| `.HasVariadic` | bool | Does this function have a variadic argument? |
338344
| `.FunctionVariadicArgumentMarkdown` | string | a Markdown formatted Function variadic argument definition |
339345
346+
##### Action Fields
347+
348+
| Field | Type | Description |
349+
|-------------------------|--------|-------------------------------------------------------------------------------------------|
350+
| `.Name` | string | Name of the action (ex. `examplecloud_do_thing`) |
351+
| `.Type` | string | `Action` |
352+
| `.Description` | string | Action description |
353+
| `.HasExample` | bool | Is there an example file? |
354+
| `.ExampleFile` | string | Path to the file with the terraform configuration example |
355+
| `.ProviderName` | string | Canonical provider name (ex. `terraform-provider-random`) |
356+
| `.ProviderShortName` | string | Short version of the rendered provider name (ex. `random`) |
357+
| `.RenderedProviderName` | string | Value provided via argument `--rendered-provider-name`, otherwise same as `.ProviderName` |
358+
| `.SchemaMarkdown` | string | a Markdown formatted Action Schema definition |
359+
340360
#### Template Functions
341361
342362
| Function | Description |

cmd/tfplugindocs/testdata/scripts/provider-build/generate/framework_provider_success_generic_templates.txtar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ generating missing data source content
2727
data-source "scaffolding_example" fallback template exists, creating template
2828
generating missing function content
2929
generating missing ephemeral resource content
30+
generating missing action content
3031
generating missing provider content
3132
provider "terraform-provider-scaffolding" template exists, skipping
3233
rendering static website

cmd/tfplugindocs/testdata/scripts/provider-build/generate/framework_provider_success_named_templates.txtar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ generating missing data source content
2727
data-source "scaffolding_example" template exists, skipping
2828
generating missing function content
2929
generating missing ephemeral resource content
30+
generating missing action content
3031
generating missing provider content
3132
provider "terraform-provider-scaffolding" template exists, skipping
3233
rendering static website

cmd/tfplugindocs/testdata/scripts/provider-build/generate/framework_provider_success_no_templates.txtar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ generating missing data source content
2525
generating new template for data-source "scaffolding_example"
2626
generating missing function content
2727
generating missing ephemeral resource content
28+
generating missing action content
2829
generating missing provider content
2930
generating new template for "terraform-provider-scaffolding"
3031
rendering static website

cmd/tfplugindocs/testdata/scripts/provider-build/generate/null_provider_success.txtar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ generating missing data source content
2424
data-source "null_data_source" fallback template exists, creating template
2525
generating missing function content
2626
generating missing ephemeral resource content
27+
generating missing action content
2728
generating missing provider content
2829
provider "terraform-provider-null" template exists, skipping
2930
rendering static website

0 commit comments

Comments
 (0)