docs(azure-disks-backup): update docs and added examples#906
docs(azure-disks-backup): update docs and added examples#906pablosanchezpaz wants to merge 3 commits intomainfrom
Conversation
|
Related to #786 |
There was a problem hiding this comment.
Pull request overview
Updates the azure-disks-backup module documentation and adds runnable examples, with terraform-docs configuration to generate/maintain the README.
Changes:
- Added
docs/header.mdanddocs/footer.mdand switched README to terraform-docs injected content. - Added a basic example (
_examples/basic) with bothmain.tfandvalues.yaml. - Added
.terraform-docs.ymlto standardize README generation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-disks-backup/docs/header.md | New header content used by terraform-docs, including overview + HCL example. |
| modules/azure-disks-backup/docs/footer.md | New footer content used by terraform-docs (links + support info). |
| modules/azure-disks-backup/_examples/basic/values.yaml | New YAML values example for the module. |
| modules/azure-disks-backup/_examples/basic/main.tf | New minimal Terraform example wiring the module. |
| modules/azure-disks-backup/README.md | Converted to terraform-docs injected README; expanded overview/example/notes and generated tables. |
| modules/azure-disks-backup/.terraform-docs.yml | Added terraform-docs config to inject header/footer and generate README. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Overview | ||
|
|
||
| This Terraform module allows you to create and configure managed disks backups in Azure, including: | ||
| - Creation of Recovery Services vault. |
There was a problem hiding this comment.
The module resources referenced elsewhere are azurerm_data_protection_backup_vault (Data Protection Backup Vault), not a Recovery Services vault. To avoid misleading users, rename this to “Data Protection Backup Vault” (or “Azure Data Protection backup vault”) so the terminology matches the actual Azure service/provider resources.
| - Creation of Recovery Services vault. | |
| - Creation of an Azure Data Protection backup vault. |
|
|
||
| This module creates and configures Azure Backup for managed disks. It sets up a Recovery Services vault, backup policies, and backup instances for specified disks. | ||
| This Terraform module allows you to create and configure managed disks backups in Azure, including: | ||
| - Creation of Recovery Services vault. |
There was a problem hiding this comment.
Same terminology issue as in docs/header.md: this appears to be a Data Protection Backup Vault module (azurerm_data_protection_backup_vault), not Recovery Services Vault. Updating this wording will prevent confusion for users trying to map docs to Azure Portal/services.
| - Creation of Recovery Services vault. | |
| - Creation of a Data Protection Backup vault. |
| backup_instances = [ | ||
| { | ||
| # Name of the disk to be backed up | ||
| disk_name = "foo-disk" | ||
|
|
||
| # Resource group where the disk is located | ||
| disk_resource_group = "foo-data" | ||
|
|
||
| # Resource group where the snapshot will be stored | ||
| snapshot_resource_group_name = "bk-disks" | ||
|
|
||
| # Name of the backup policy to apply | ||
| backup_policy_name = "foo-policy" | ||
| disk_name = "foo-disk" | ||
| disk_resource_group = "foo-data" | ||
| snapshot_resource_group_name = "bk-disks" | ||
| backup_policy_name = "foo-policy" | ||
| }, |
There was a problem hiding this comment.
The example includes snapshot_resource_group_name, but the generated Inputs table below defines backup_instances without that field (and the _examples/basic/values.yaml also omits it). Please make the README consistent: either remove snapshot_resource_group_name from the example if the module no longer accepts it, or update the module input schema/docs so it’s documented and shown in the inputs table.
| name = "foo-policy" | ||
| backup_repeating_time_intervals = ["R/2024-10-17T11:29:40+00:00/PT1H"] | ||
| default_retention_duration = "P7D" |
There was a problem hiding this comment.
The example hard-codes a specific start timestamp for backup_repeating_time_intervals in 2024. As time passes, this can become stale and may be rejected by the Azure API/provider if it requires a start time in the present/future. Consider using a placeholder in docs (e.g., R/<RFC3339_START>/PT1H) and explaining it, or generating the start time dynamically (if supported by the module/provider).
| - `vault_id`: The ID of the Recovery Services vault | ||
| | Name | Description | | ||
| |------|-------------| | ||
| | <a name="output_vault_id"></a> [vault\_id](#output\_vault\_id) | n/a | |
There was a problem hiding this comment.
The generated outputs table shows vault_id with description n/a, which typically means the output block lacks a description. Adding an output description in outputs.tf and regenerating docs would make the README more informative for consumers.
| | <a name="output_vault_id"></a> [vault\_id](#output\_vault\_id) | n/a | | |
| | <a name="output_vault_id"></a> [vault\_id](#output\_vault\_id) | The resource ID of the backup vault created by this module. | |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.