Skip to content

docs(azure-event-hub): update docs and added examples#904

Draft
pablosanchezpaz wants to merge 3 commits intomainfrom
add/azure-event-hub-docs
Draft

docs(azure-event-hub): update docs and added examples#904
pablosanchezpaz wants to merge 3 commits intomainfrom
add/azure-event-hub-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 Event Hub module documentation to use terraform-docs with a custom header/footer and adds a basic, runnable example for consumers.

Changes:

  • Added docs/header.md and docs/footer.md and configured terraform-docs injection for README.md
  • Added a “basic” example with both YAML values and a Terraform module invocation
  • Refreshed README.md content to include overview, usage example(s), and generated inputs/outputs

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
modules/azure-event-hub/docs/header.md Adds a richer module overview and a full YAML usage example for the generated README header.
modules/azure-event-hub/docs/footer.md Adds examples/support links for the generated README footer.
modules/azure-event-hub/_examples/basic/values.yaml Provides a basic YAML-values example for the module.
modules/azure-event-hub/_examples/basic/main.tf Provides a basic Terraform example invoking the module.
modules/azure-event-hub/README.md Replaces the README with terraform-docs-injected content plus the custom header/footer.
modules/azure-event-hub/.terraform-docs.yml Configures terraform-docs to inject generated docs with header/footer sources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 22 to 27
example-topic = {
name = "example-system-topic"
location = "westeurope"
topic_type = "Microsoft.EventHub.namespaces"
source_resource_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-namespace"
}
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.

example-topic is not a valid unquoted key in HCL (the hyphen is parsed as the subtraction operator). Quote the key (e.g., "example-topic" = { ... }) or rename it to a valid identifier (e.g., example_topic = { ... }) so the example is runnable.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +21
system_topic:
example-topic:
name: example-system-topic
location: westeurope
topic_type: Microsoft.EventHub.namespaces
source_resource_id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-namespace
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 docs in README/header use system_topic_name as the map key selector (e.g., topic-events). In this example, system_topic_name is set to the system topic’s name value (example-system-topic) rather than the map key (example-topic). Align this example with the documented pattern (either change system_topic_name to example-topic, or update docs/module semantics if system_topic_name is intended to be the actual system topic name).

Copilot uses AI. Check for mistakes.
send: false
manage: false
event_subscription: null
system_topic_name: example-system-topic
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 docs in README/header use system_topic_name as the map key selector (e.g., topic-events). In this example, system_topic_name is set to the system topic’s name value (example-system-topic) rather than the map key (example-topic). Align this example with the documented pattern (either change system_topic_name to example-topic, or update docs/module semantics if system_topic_name is intended to be the actual system topic name).

Suggested change
system_topic_name: example-system-topic
system_topic_name: example-topic

Copilot uses AI. Check for mistakes.
}
]
event_subscription = null
system_topic_name = "example-system-topic"
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 in the YAML example: system_topic_name appears to be used as a reference to the system_topic map key in the docs, but here it’s set to the topic’s name field. Change it to match the map key used under system_topic (and note this may interact with how you fix the example-topic key naming/quoting).

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +25
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
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.

With output.mode: inject, the README typically already contains the BEGIN_TF_DOCS/END_TF_DOCS markers and terraform-docs replaces the content between them. Including the markers inside the injected template can lead to nested/duplicated markers over successive runs. Prefer keeping the markers only in README and using a template like {{ .Content }} (or switch modes to one that expects the template to include markers).

Suggested change
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
{{ .Content }}

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,48 @@
formatter: "markdown" # this is required

version: ""
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.

Leaving version empty makes generated README output dependent on whichever terraform-docs version a contributor has installed, which can cause noisy diffs. Pin to a known-good terraform-docs version used by CI (and/or document the expected version) to keep docs generation deterministic.

Suggested change
version: ""
version: "0.16.0"

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,101 @@
# Azure Event Hub Terraform Module
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.

Azure’s service name is “Event Hubs” (plural). Consider renaming the title (and any other new headings) to “Azure Event Hubs Terraform Module” for consistency with Azure terminology and provider resource naming.

Suggested change
# Azure Event Hub Terraform Module
# Azure Event Hubs Terraform Module

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