docs(azure-vnet-peering): update docs and added examples#888
docs(azure-vnet-peering): update docs and added examples#888pablosanchezpaz wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves documentation for the azure-vnet-peering Terraform module by introducing terraform-docs header/footer content, generating/injecting updated README content, and adding a basic example configuration under _examples.
Changes:
- Added
docs/header.mdanddocs/footer.mdcontent to be consumed by terraform-docs. - Added a
basicexample undermodules/azure-vnet-peering/_examples/basic. - Added
.terraform-docs.ymland updatedREADME.mdwith injected terraform-docs output.
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-vnet-peering/docs/header.md | Adds module overview/features and a “real usage” snippet for terraform-docs header. |
| modules/azure-vnet-peering/docs/footer.md | Adds examples/resources/support footer for terraform-docs. |
| modules/azure-vnet-peering/_examples/basic/main.tf | Adds a minimal working Terraform example using the module locally. |
| modules/azure-vnet-peering/_examples/basic/values.yaml | Adds a YAML values file for the basic example. |
| modules/azure-vnet-peering/README.md | Injects terraform-docs generated section into the module README. |
| modules/azure-vnet-peering/.terraform-docs.yml | Adds terraform-docs configuration for README injection with header/footer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
modules/azure-vnet-peering/README.md
Outdated
| ```terraform | ||
| module "azure-vnet-peering" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-vnet-peering?ref=<version>" | ||
| } | ||
| ``` |
There was a problem hiding this comment.
In the generated TF docs section, the example uses module "azure-vnet-peering" (hyphen is invalid in Terraform identifiers) and closes the module block right after source, so the snippet can't be applied as-is.
modules/azure-vnet-peering/README.md
Outdated
| ############### | ||
| # VNET ORIGIN # | ||
| ############### | ||
|
|
||
| origin\_virtual\_network\_name = "origen-vnet" | ||
| origin\_resource\_group\_name = "test-peering" | ||
| origin\_name\_peering = "origen-vnet-to-destino-vnet" | ||
|
|
||
| #################### | ||
| # VNET DESTINATION # | ||
| #################### | ||
|
|
||
| destination\_virtual\_network\_name = "destino-vnet" | ||
| destination\_resource\_group\_name = "test-peering" | ||
| destination\_name\_peering = "destino-vnet-to-origen-vnet" | ||
| } |
There was a problem hiding this comment.
The origin/destination arguments are outside the fenced Terraform block and outside the module block, and they are indented/escaped (origin\_virtual\_network\_name, etc.). This reads as malformed Terraform; consider keeping a single complete module example inside the ```terraform block, or present these values in a separate tfvars example code block.
| module "azure-vnet-peering" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-vnet-peering?ref=<version>" | ||
| } | ||
| ``` | ||
|
|
||
| ############### | ||
| # VNET ORIGIN # | ||
| ############### | ||
|
|
||
| origin_virtual_network_name = "origen-vnet" | ||
| origin_resource_group_name = "test-peering" | ||
| origin_name_peering = "origen-vnet-to-destino-vnet" | ||
|
|
||
| #################### | ||
| # VNET DESTINATION # | ||
| #################### |
There was a problem hiding this comment.
The Terraform example is not copy/pasteable: module "azure-vnet-peering" uses a hyphen (invalid in Terraform module block labels), and the module block is closed immediately after source, leaving required inputs outside the block.
| module "azure-vnet-peering" { | |
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-vnet-peering?ref=<version>" | |
| } | |
| ``` | |
| ############### | |
| # VNET ORIGIN # | |
| ############### | |
| origin_virtual_network_name = "origen-vnet" | |
| origin_resource_group_name = "test-peering" | |
| origin_name_peering = "origen-vnet-to-destino-vnet" | |
| #################### | |
| # VNET DESTINATION # | |
| #################### | |
| module "azure_vnet_peering" { | |
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-vnet-peering?ref=<version>" | |
| ############### | |
| # VNET ORIGIN # | |
| ############### | |
| origin_virtual_network_name = "origen-vnet" | |
| origin_resource_group_name = "test-peering" | |
| origin_name_peering = "origen-vnet-to-destino-vnet" | |
| #################### | |
| # VNET DESTINATION # | |
| #################### |
| ############### | ||
| # VNET ORIGIN # | ||
| ############### | ||
|
|
||
| origin_virtual_network_name = "origen-vnet" | ||
| origin_resource_group_name = "test-peering" | ||
| origin_name_peering = "origen-vnet-to-destino-vnet" | ||
|
|
||
| #################### | ||
| # VNET DESTINATION # | ||
| #################### | ||
|
|
||
| destination_virtual_network_name = "destino-vnet" | ||
| destination_resource_group_name = "test-peering" | ||
| destination_name_peering = "destino-vnet-to-origen-vnet" | ||
| } |
There was a problem hiding this comment.
The origin/destination inputs and closing } are outside the ```terraform fenced block. This causes the underscores to render escaped in generated docs and makes the example syntactically incorrect. Put the inputs inside the module block (or move them into a separate tfvars code block).
|
@pablosanchezpaz we'll discuss it when you can at a meet. But the important thing about this is that the contributing is fulfilled, which is designed to feed the context of the AI tool, and it is not being fulfilled in practically any of the PRs.
They are fundamental, then additional information that we already have can be added as another aspect between Key Features and Basic Usage. |
|
Related to #786 |
No description provided.