Skip to content

docs(azure-vnet-peering): update docs and added examples#888

Draft
pablosanchezpaz wants to merge 3 commits intomainfrom
add/azure-vnet-peering-docs
Draft

docs(azure-vnet-peering): update docs and added examples#888
pablosanchezpaz wants to merge 3 commits intomainfrom
add/azure-vnet-peering-docs

Conversation

@pablosanchezpaz
Copy link
Contributor

No description provided.

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

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.md and docs/footer.md content to be consumed by terraform-docs.
  • Added a basic example under modules/azure-vnet-peering/_examples/basic.
  • Added .terraform-docs.yml and updated README.md with 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.

Comment on lines 70 to 74
```terraform
module "azure-vnet-peering" {
source = "git::https://github.com/prefapp/tfm.git//modules/azure-vnet-peering?ref=<version>"
}
```
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 76 to 91
###############
# 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"
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

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

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

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

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 35
###############
# 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"
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@jotasixto
Copy link
Contributor

@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.
The sections:

  • Title
  • Overview
  • Key Features
  • Basic Usage

They are fundamental, then additional information that we already have can be added as another aspect between Key Features and Basic Usage.
And of course, do not leave duplicate sections or duplicate information in the README; this does not help a coherent context.

@pablosanchezpaz
Copy link
Contributor Author

Related to #786

@pablosanchezpaz pablosanchezpaz marked this pull request as draft February 11, 2026 16:43
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.

3 participants