docs/end-user-documentation.md
All end user documentation is found in the /website folder of the repository.
├── website/docs
│ ├── actions/ # Documentation for actions
│ ├── d/ # Documentation for data sources
│ ├── ephemeral-resources/ # Documentation for ephemeral resources
│ ├── function/ # Documentation for provider functions
│ ├── guides/ # Long format guides for provider level configuration or provider upgrades
│ ├── index.html.markdown # Home page and all provider level documentation, including provider configuration
│ ├── list-resources/ # Documentation for list resources
│ └── r/ # Documentation for resources
└── examples/ # Large example configurations
Follow these guidelines to keep provider documentation consistent. Unless noted otherwise, resource refers to resources, data sources, list resources, ephemeral resources and provider functions.
Each resource must include at least one example Terraform configuration.
examples directory instead of an individual resource documentation page. Each directory under examples should be self-contained; if a user run terraform plan on the example, no errors should be returned.terraform code fences. Do not use hcl code fences.terraform or provider blocks.variable, local, count, and built-in functions.example, e.g. resource "aws_instance" "example".example-, e.g. name = "example-instance". Avoid overly complex naming.Every argument must be documented.
In documentation, the order of arguments is:
Valid bylines are:
Every argument must have a description.
Allowed values are: `value1`, `value2`, and `value3`..Valid value is between `0` and `100`.Default value: `ENABLED`..Each block argument must have two entries in the documentation:
`ip_rule` - (Optional) IP rules. See [`ip_rule` Block](#ip_rule-block) below..Within the subsection, arguments follow the ordering rules above. Additionally any Computed attributes are listed alphabetically after any Optional arguments.
For example:
## Argument Reference
* `name` - (Required) Name of the thing.
* `ip_rule` - (Optional) IP rules. See [`ip_rule` Block](#ip_rule-block) below.
### `ip_rule` Block
The `ip_rule` block supports:
* `ip_range` - (Required) IP range of the rule.
* `description` - (Optional) Description of the rule.
* `status` - (Computed) Status of the rule.
Every attribute must be documented.
In documentation, the order of attributes is:
id attributeValid bylines are:
Every attribute must have a description.
Each block attribute must have two entries in the documentation:
`health` - Health status. See [`health`](#health) below..Within the subsection, arguments follow the ordering rules above.
For example:
## Attribute Reference
This resource exports the following attributes in addition to the arguments above:
* `id` - ID of the thing.
* `health` - Health status. See [`health`](#health) below.
### `health`
`health` supports:
* `status_code` - Health status code.
* `status_message` - Health status message.
Don't spell out an abbreviation in a description if the abbreviation has effectively become a lexical item — a term readers understand directly rather than by expanding it. Spelling it out can make documentation less readable without improving understanding.
For example, a typical reader understands "ARN" directly; expanding it to "Amazon Resource Name" does not help them understand the concept.
Test for treating an abbreviation this way: Does spelling it out materially improve the intended reader's understanding? If not, use the abbreviation.
This applies to argument and attribute descriptions, as well as general prose (e.g. the resource description, Note blocks). It does not apply to the first use of a term that a typical reader of AWS provider documentation would not already recognize.
Abbreviations to use instead of spelling out (swissshepherd's banned_glosses check enforces this list; see .ci/swissshepherd-weak.hcl):
| Abbreviation | Do not spell out as |
|---|---|
| AMI | Amazon Machine Image |
| ARN | Amazon Resource Name |
| ARNs | Amazon Resource Names |
| API | Application Programming Interface |
| CPU | Central Processing Unit |
| CLI | Command-Line Interface |
| DNS | Domain Name System |
| EC2 | Elastic Compute Cloud |
| XML | Extensible Markup Language |
| GPU | Graphics Processing Unit |
| HTML | HyperText Markup Language |
| HTTP | Hypertext Transfer Protocol |
| IP | Internet Protocol |
| JSON | JavaScript Object Notation |
| KMS | Key Management Service |
| RDS | Relational Database Service |
| S3 | Simple Storage Service |
| SDK | Software Development Kit |
| SQL | Structured Query Language |
| TCP | Transmission Control Protocol |
| TLS | Transport Layer Security |
| UTF | Unicode Transformation Format |
| URI | Uniform Resource Identifier |
| URL | Uniform Resource Locator |
| USB | Universal Serial Bus |
| VPC | Virtual Private Cloud |
| VPN | Virtual Private Network |
| YAML | YAML Ain't Markup Language |
Notes provide information beyond the basic description of a resource, argument or attribute.
Notes follow the format ((->|~>|!>) **Note:**). Level of importance is documented below.
Provides additional useful information, recommendations and/or tips to the user.
Use the -> **Note:** format. The Terraform registry will template this note as a block with an info icon.
For example:
-> **Note:** The `activation_code` argument cannot be imported.
Provides information that the user will need to avoid certain errors. These errors are non-breaking and do not cause irreversable changes.
Use the ~> **Note:** format. The Terraform registry will template this note as a block with a warning icon.
For example:
~> **Note:** All arguments including the username and password will be stored in the raw state as plain-text.
Provides critical information on potential irreversible changes, including data loss and other negative effects.
Use the !> **Note:** format. The Terraform registry will template this note as a block with a caution icon.
For example:
!> **Note:** This will destroy and recreate the table, possibly resulting in data loss.