docs(azure-disks): update docs and added examples#905
docs(azure-disks): update docs and added examples#905pablosanchezpaz wants to merge 1 commit intomainfrom
Conversation
|
Related to #786 |
There was a problem hiding this comment.
Pull request overview
Updates the azure-disks module documentation to be terraform-docs driven and adds a basic runnable example.
Changes:
- Added terraform-docs header/footer content and configured
.terraform-docs.ymlfor README injection - Added a
_examples/basicexample (Terraform + values.yaml) - Refreshed the module README content and links
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-disks/docs/header.md | Adds the terraform-docs header content (overview, features, usage snippet). |
| modules/azure-disks/docs/footer.md | Adds examples/resources/support footer content for terraform-docs. |
| modules/azure-disks/_examples/basic/main.tf | Adds a basic Terraform configuration consuming the module. |
| modules/azure-disks/_examples/basic/values.yaml | Adds example input values for the module. |
| modules/azure-disks/README.md | Switches to terraform-docs injected README and adds examples/resources/support sections. |
| modules/azure-disks/.terraform-docs.yml | Configures terraform-docs to inject header/footer into README. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Support for tags and inheritance from the Resource Group. | ||
| - Ignores disk size changes in lifecycle (useful for CSI Driver). | ||
|
|
||
| ## Complete usage example |
There was a problem hiding this comment.
The “Complete usage example” shows disks as a YAML list with name/storage_account_type, but the added _examples/basic uses disks as a Terraform map keyed by disk name and uses sku (not storage_account_type). This inconsistency makes the docs hard to follow and likely copy/paste broken; please update the header example to match the module’s actual input schema (map vs list) and align attribute names (sku vs storage_account_type) with what the module expects.
| - Support for tags and inheritance from the Resource Group. | ||
| - Ignores disk size changes in lifecycle (useful for CSI Driver). | ||
|
|
||
| ## Complete usage example |
There was a problem hiding this comment.
Same issue as docs/header.md: the README usage example documents disks as a list and uses storage_account_type, but the concrete example added in _examples/basic uses a map and sku. Please make README’s “Complete usage example” consistent with the real example and the module inputs to avoid misleading users.
|
|
||
| disks = { | ||
| data1 = { | ||
| # This map is intentionally loose; adapt keys to match main.tf expectations. |
There was a problem hiding this comment.
This comment undermines the example’s usefulness because it doesn’t tell the reader what the “main.tf expectations” actually are. Consider replacing it with a short note that explicitly references the module’s disks input shape (e.g., map keyed by disk name) and which attributes are required vs optional, so the example is confidently copy/pastable.
| # This map is intentionally loose; adapt keys to match main.tf expectations. | |
| # `disks` is a map keyed by disk name. Each disk must at least define | |
| # `size_gb`, `sku`, and `create_option`; optional attributes include | |
| # `zone`, `encryption_type`, `disk_iops_read_write`, and `disk_mbps_read_write`. |
| For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azure-disks/_examples): | ||
|
|
||
| - [basic](https://github.com/prefapp/tfm/tree/main/modules/azure-disks/_examples/basic) - Basic managed disk configuration with size, SKU and performance settings. |
There was a problem hiding this comment.
These hard-coded GitHub links to prefapp/tfm and the main branch make the docs less portable (e.g., forks, alternate default branches, offline rendering). Prefer relative links (e.g., ./_examples and ./_examples/basic) so the docs work correctly across forks and branches.
| For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azure-disks/_examples): | |
| - [basic](https://github.com/prefapp/tfm/tree/main/modules/azure-disks/_examples/basic) - Basic managed disk configuration with size, SKU and performance settings. | |
| For detailed examples, refer to the [module examples](./_examples): | |
| - [basic](./_examples/basic) - Basic managed disk configuration with size, SKU and performance settings. |
No description provided.