Skip to content

Commit da07548

Browse files
committed
add list
1 parent d13b649 commit da07548

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

content/terraform-docs-common/docs/plugin/framework-benefits.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,5 +259,6 @@ Additional new and improved features in the framework include:
259259
- **Functions**: The framework supports provider-defined functions which are exposed for practitioner configurations.
260260
- **Ephemeral Resources**: The framework supports ephemeral resources which do not store data in the Terraform plan or state artifacts.
261261
- **Actions**: The framework supports actions which are side-effects that can be used to express workflows that don't strictly fit into CRUD resource management, such as disaster recovery or ad-hoc maintenance.
262+
- **List Resources**: The framework supports the list operation for a resource, which can be used with Terraform to discover unmanaged resources.
262263

263264
Refer to [Framework Feature Comparison](/terraform/plugin/framework/migrating/benefits) for a continued list of features, details, and examples.

content/terraform-docs-common/docs/registry/providers/docs.mdx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If preferred you can choose to also invoke this manually for your provider. Once
3434

3535
## Format
3636

37-
Provider documentation should be a directory of Markdown documents in the provider repository. Each Markdown document is rendered as a separate page. The directory should include a document for the provider index, a document for each resource, data source, ephemeral resource, action, function, and optional documents for any guides.
37+
Provider documentation should be a directory of Markdown documents in the provider repository. Each Markdown document is rendered as a separate page. The directory should include a document for the provider index, a document for each resource, data source, ephemeral resource, action, list resource, function, and optional documents for any guides.
3838

3939
### Directory Structure
4040

@@ -47,6 +47,7 @@ Provider documentation should be a directory of Markdown documents in the provid
4747
| `docs/functions/` | `<function>.md` | Information on a provider function. |
4848
| `docs/ephemeral-resources/` | `<ephemeral-resource>.md` | Information for an Ephemeral Resource. Filename should not include a `<PROVIDER NAME>_` prefix. |
4949
| `docs/actions/` | `<action>.md` | Information for an action. Filename should not include a `<PROVIDER NAME>_` prefix. |
50+
| `docs/list-resources/` | `<list-resource>.md` | Information for a List Resource. Filename should not include a `<PROVIDER NAME>_` prefix. |
5051

5152
-> **Note:** To support provider docs already formatted for publishing to [the website][terraform-io-providers], the Terraform Registry also supports docs in a `website/docs/` legacy directory with file extensions of `.html.markdown` or `.html.md`.
5253

@@ -73,10 +74,10 @@ app/service documentation.
7374
* List any arguments for the provider block.
7475
````
7576

76-
#### Resource/Data Source/Ephemeral Resource/Action Headers
77+
#### Resource Type (managed, data source, ephemeral, etc.) Headers
7778

7879
````
79-
# <resource name> Resource/Data Source/Ephemeral Resource/Action
80+
# <resource name> <Resource Type>
8081
8182
Description of what this resource does, with links to official
8283
app/service documentation.
@@ -156,11 +157,11 @@ If you start a paragraph with a special arrow-like sigil, it will become a color
156157

157158
## Navigation Hierarchy
158159

159-
Provider docs are organized by category: functions, actions, ephemeral resources, resources, data sources, and guides. At a minimum, a provider must contain an index (`docs/index.md`) and at least one function, action, ephemeral resource, resource, or data source.
160+
Provider docs are organized by category: functions, actions, list resources, ephemeral resources, resources, data sources, and guides. At a minimum, a provider must contain an index (`docs/index.md`) and at least one function, action, ephemeral resource, list resource, resource, or data source.
160161

161162
### Typical Structure
162163

163-
A provider named `example` with a resource and data source for `instance`, an ephemeral resource for `auth_token`, an action named `stop_instance`, and a function named `parse_instance_id` would have these 5 files:
164+
A provider named `example` with a resource, list resource, and data source for `instance`, an ephemeral resource for `auth_token`, an action named `stop_instance`, and a function named `parse_instance_id` would have these 5 files:
164165

165166
```
166167
docs/
@@ -173,6 +174,8 @@ docs/
173174
auth_token.md
174175
functions/
175176
parse_instance_id.md
177+
list-resources/
178+
instance.md
176179
resources/
177180
instance.md
178181
```
@@ -186,6 +189,8 @@ After publishing this provider version, its page on the Terraform Registry would
186189
* parse_instance_id
187190
* Ephemeral Resources
188191
* example_auth_token
192+
* List Resources
193+
* example_instance
189194
* Resources
190195
* example_instance
191196
* Data Sources
@@ -211,6 +216,8 @@ This would change the navigation hierarchy to the following:
211216
* parse_instance_id
212217
* Ephemeral Resources
213218
* example_auth_token
219+
* List Resources
220+
* example_instance
214221
* Resources
215222
* example_instance
216223
* Data Sources
@@ -240,6 +247,8 @@ docs/
240247
auth_token.md
241248
functions/
242249
parse_instance_id.md
250+
list-resources/
251+
instance.md
243252
resources/
244253
instance.md
245254
```
@@ -263,12 +272,14 @@ The `page_title` is used (instead of the filename) for rendering the link to thi
263272
* parse_instance_id
264273
* Ephemeral Resources
265274
* example_auth_token
275+
* List Resources
276+
* example_instance
266277
* Resources
267278
* example_instance
268279
* Data Sources
269280
* example_instance
270281

271-
Guides are always rendered before resources, data sources, functions, actions, ephemeral resources, and any subcategories.
282+
Guides are always rendered before resources, data sources, functions, actions, ephemeral resources, list resources, and any subcategories.
272283

273284
If a `page_title` attribute is not found, the title will default to the filename without the extension.
274285

@@ -291,6 +302,8 @@ docs/
291302
auth_token.md
292303
functions/
293304
parse_instance_id.md
305+
list-resources/
306+
instance.md
294307
resources/
295308
instance.md
296309
```
@@ -309,6 +322,8 @@ Assuming that these three guides have titles similar to their filenames, and the
309322
* parse_instance_id
310323
* Ephemeral Resources
311324
* example_auth_token
325+
* List Resources
326+
* example_instance
312327
* Resources
313328
* example_instance
314329
* Data Sources
@@ -328,7 +343,7 @@ If you want to publish docs on the Terraform Registry that are not available on
328343
1. Expand the folder names to match the Terraform Registry's expected format:
329344
* Rename `docs/d/` to `docs/data-sources/`
330345
* Rename `docs/r/` to `docs/resources/`
331-
* No changes necessary for `docs/functions/`, `docs/ephemeral-resources`, `docs/actions`, or `docs/guides`
346+
* No changes necessary for `docs/functions/`, `docs/ephemeral-resources`, `docs/list-resources`, `docs/actions`, or `docs/guides`
332347
1. Change file suffixes from `.html.markdown` or `.html.md` to `.md`.
333348

334349
[terraform-registry]: https://registry.terraform.io

0 commit comments

Comments
 (0)