docs(azure-sa): update docs and added examples#891
docs(azure-sa): update docs and added examples#891pablosanchezpaz wants to merge 3 commits intomainfrom
Conversation
|
Related to #786 |
There was a problem hiding this comment.
Pull request overview
Updates the Azure Storage Account module documentation and adds runnable example configurations to make adoption and testing easier.
Changes:
- Added terraform-docs header/footer sources and config for consistent README generation.
- Added
basicandcompletemodule usage examples (Terraform + YAML values). - Refreshed the module README to include overview, usage, and links to examples/resources.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-sa/docs/header.md | New shared header content injected into README via terraform-docs. |
| modules/azure-sa/docs/footer.md | New shared footer with example links and resources. |
| modules/azure-sa/_examples/complete/values.yaml | Adds a full configuration example (network rules, lifecycle, services). |
| modules/azure-sa/_examples/complete/main.tf | Adds a runnable example that decodes values.yaml and wires module inputs. |
| modules/azure-sa/_examples/basic/main.tf | Adds a minimal runnable example using variables. |
| modules/azure-sa/README.md | Regenerated/expanded README with header/footer and trimmed inline example block. |
| modules/azure-sa/.terraform-docs.yml | Adds terraform-docs config to inject header/footer into README. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
modules/azure-sa/docs/header.md
Outdated
| └── _examples/ | ||
| └── values.yaml |
There was a problem hiding this comment.
The documented file structure shows _examples/values.yaml, but the PR introduces _examples/basic/... and _examples/complete/.... Update this tree to reflect the actual example directories/files so users can find the examples.
modules/azure-sa/docs/header.md
Outdated
| account_replication_type: "LRS" | ||
| ``` | ||
|
|
||
| > For a complete and advanced example, see the file at `_examples/basic/values.yaml`. No newline at end of file |
There was a problem hiding this comment.
This link text says 'complete and advanced example' but points to _examples/basic/values.yaml. It should point to the complete example (and to the correct filename, e.g. _examples/complete/values.yaml), or adjust the wording to match the basic example.
| > For a complete and advanced example, see the file at `_examples/basic/values.yaml`. | |
| > For a complete basic example file, see `_examples/values.yaml`. |
| @@ -0,0 +1,18 @@ | |||
| locals { | |||
| values = yamldecode(file("./values.yaml")) | |||
There was a problem hiding this comment.
Using file(\"./values.yaml\") makes the example depend on the current working directory, which can break when running Terraform from a different directory (e.g., CI or -chdir). Prefer an explicit module-relative path (e.g., based on path.module) for reliability.
| values = yamldecode(file("./values.yaml")) | |
| values = yamldecode(file("${path.module}/values.yaml")) |
| - "/subscriptions/324ca80b-cea7-41ff-ac13-25441f452f33/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet" | ||
| - "/subscriptions/c9e99a2d-e0cd-473b-935c-bc2e37ea8511/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet1" |
There was a problem hiding this comment.
These look like real Azure subscription GUIDs. Even in examples, it’s safer to use clearly fake placeholder values (e.g., 00000000-0000-0000-0000-000000000000 or /subscriptions/<subscription-id>/...) to avoid accidentally publishing sensitive tenant identifiers.
| - "/subscriptions/324ca80b-cea7-41ff-ac13-25441f452f33/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet" | |
| - "/subscriptions/c9e99a2d-e0cd-473b-935c-bc2e37ea8511/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet1" | |
| - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet" | |
| - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rg_test/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet1" |
modules/azure-sa/.terraform-docs.yml
Outdated
| anchor: true | ||
| color: true | ||
| default: true | ||
| description: false |
There was a problem hiding this comment.
With description: false, terraform-docs omits variable/output descriptions, which results in n/a in generated sections (as seen for the id output in the README). If the intent is to keep descriptions in the README, set this to true (or remove this override) so generated docs remain informative.
| description: false | |
| description: true |
modules/azure-sa/README.md
Outdated
| | Name | Description | | ||
| |------|-------------| | ||
| | <a name="output_id"></a> [id](#output\_id) | ID of the storage account | | ||
| | <a name="output_id"></a> [id](#output\_id) | n/a | |
There was a problem hiding this comment.
The id output description regressed to n/a, which makes the output table less useful. Restore the output description (likely by enabling terraform-docs descriptions in config) so consumers can understand what id represents.
| | <a name="output_id"></a> [id](#output\_id) | n/a | | |
| | <a name="output_id"></a> [id](#output\_id) | The resource ID of the Storage Account | |
No description provided.