Skip to content

docs(azure-disks): update docs and added examples#905

Draft
pablosanchezpaz wants to merge 1 commit intomainfrom
add/azure-disks-docs
Draft

docs(azure-disks): update docs and added examples#905
pablosanchezpaz wants to merge 1 commit intomainfrom
add/azure-disks-docs

Conversation

@pablosanchezpaz
Copy link
Contributor

No description provided.

@pablosanchezpaz pablosanchezpaz requested a review from a team as a code owner February 6, 2026 08:27
@pablosanchezpaz
Copy link
Contributor Author

Related to #786

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml for README injection
  • Added a _examples/basic example (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
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- Support for tags and inheritance from the Resource Group.
- Ignores disk size changes in lifecycle (useful for CSI Driver).

## Complete usage example
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

disks = {
data1 = {
# This map is intentionally loose; adapt keys to match main.tf expectations.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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`.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
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.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@pablosanchezpaz pablosanchezpaz marked this pull request as draft February 11, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants