docs(azure-application): update docs and added examples#909
docs(azure-application): update docs and added examples#909pablosanchezpaz wants to merge 5 commits intomainfrom
Conversation
|
Related to #786 |
There was a problem hiding this comment.
Pull request overview
Updates the Azure Application Registration module documentation and adds a basic runnable example to help consumers configure members, redirects, Microsoft Graph roles, and client secrets.
Changes:
- Added
docs/header.mdanddocs/footer.mdcontent (overview + links/examples) for Terraform docs generation. - Added a
_examples/basicexample in both YAML values and Terraform usage. - Expanded
README.mdwith overview/example content and updated the documentedmsgraph_rolesinput shape.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-application/docs/header.md | Adds module overview + basic HCL example and repo structure section. |
| modules/azure-application/docs/footer.md | Adds examples section + additional resources/support links. |
| modules/azure-application/_examples/basic/example.yaml | Adds a YAML “values” example for the basic module configuration. |
| modules/azure-application/_examples/basic/example.tf | Adds a concrete Terraform example consuming the module. |
| modules/azure-application/README.md | Embeds header/footer-like content and updates documented inputs/providers + example links. |
Comments suppressed due to low confidence (1)
modules/azure-application/README.md:1
- The description says each role includes a 'name', but the schema uses
id. Either rename the field in the schema (if it's actually a role name) or update the description to consistently refer toid(and clarify whether it's a role definition id, permission scope id, etc.).
<!-- BEGIN_TF_DOCS -->
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Overview | ||
|
|
||
| Este módulo de Terraform permite crear y gestionar un registro de aplicación en Azure Active Directory (Azure AD), incluyendo: | ||
| - Creación de la aplicación y service principal. | ||
| - Asignación de roles y permisos (incluyendo Microsoft Graph). | ||
| - Configuración de credenciales federadas y secretos. | ||
| - Soporte para redirecciones y miembros. | ||
| - Integración opcional con Azure Key Vault para almacenar secretos. | ||
|
|
||
| ## Características principales | ||
| - Registro de aplicación y service principal en Azure AD. | ||
| - Asignación de roles personalizados y de Microsoft Graph. | ||
| - Soporte para credenciales federadas (OIDC, GitHub Actions, etc). | ||
| - Gestión de secretos con rotación y almacenamiento seguro en Key Vault. | ||
| - Configuración flexible de redirecciones y miembros. | ||
|
|
||
| ## Ejemplo básico de uso | ||
|
|
||
| ```hcl | ||
| module "azure_application" { | ||
| source = "./modules/azure-application" | ||
| name = "my-app" | ||
| members = ["user1@dominio.com", "user2@dominio.com"] | ||
| msgraph_roles = ["User.Read.All"] | ||
| redirects = [{ | ||
| platform = "web" | ||
| redirect_uris = ["https://myapp.com/auth/callback"] | ||
| }] | ||
| client_secret = { | ||
| enabled = true | ||
| rotation_days = 90 | ||
| keyvault = { | ||
| id = azurerm_key_vault.example.id | ||
| key_name = "my-app-secret" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Estructura de archivos | ||
|
|
||
| ``` | ||
| . | ||
| ├── main.tf | ||
| ├── variables.tf | ||
| ├── outputs.tf | ||
| ├── versions.tf | ||
| ├── README.md | ||
| ├── CHANGELOG.md | ||
| └── docs/ | ||
| ├── header.md | ||
| └── footer.md | ||
| ``` | ||
|
|
There was a problem hiding this comment.
The content in README.md appears duplicated with the newly added docs/header.md and docs/footer.md (same overview/example/resources). Keeping the same text in multiple places is likely to drift. Prefer a single source of truth: either generate the README via terraform-docs using docs/header.md/docs/footer.md, or remove the duplicate docs files if they aren't part of the generation pipeline.
| ## Overview | |
| Este módulo de Terraform permite crear y gestionar un registro de aplicación en Azure Active Directory (Azure AD), incluyendo: | |
| - Creación de la aplicación y service principal. | |
| - Asignación de roles y permisos (incluyendo Microsoft Graph). | |
| - Configuración de credenciales federadas y secretos. | |
| - Soporte para redirecciones y miembros. | |
| - Integración opcional con Azure Key Vault para almacenar secretos. | |
| ## Características principales | |
| - Registro de aplicación y service principal en Azure AD. | |
| - Asignación de roles personalizados y de Microsoft Graph. | |
| - Soporte para credenciales federadas (OIDC, GitHub Actions, etc). | |
| - Gestión de secretos con rotación y almacenamiento seguro en Key Vault. | |
| - Configuración flexible de redirecciones y miembros. | |
| ## Ejemplo básico de uso | |
| ```hcl | |
| module "azure_application" { | |
| source = "./modules/azure-application" | |
| name = "my-app" | |
| members = ["user1@dominio.com", "user2@dominio.com"] | |
| msgraph_roles = ["User.Read.All"] | |
| redirects = [{ | |
| platform = "web" | |
| redirect_uris = ["https://myapp.com/auth/callback"] | |
| }] | |
| client_secret = { | |
| enabled = true | |
| rotation_days = 90 | |
| keyvault = { | |
| id = azurerm_key_vault.example.id | |
| key_name = "my-app-secret" | |
| } | |
| } | |
| } | |
| ``` | |
| ## Estructura de archivos | |
| ``` | |
| . | |
| ├── main.tf | |
| ├── variables.tf | |
| ├── outputs.tf | |
| ├── versions.tf | |
| ├── README.md | |
| ├── CHANGELOG.md | |
| └── docs/ | |
| ├── header.md | |
| └── footer.md | |
| ``` | |
| <!-- | |
| NOTE: | |
| This README is generated by terraform-docs. | |
| The human-maintained overview, examples, and additional resources | |
| live in: | |
| - docs/header.md | |
| - docs/footer.md | |
| To update this documentation, edit those files and re-run terraform-docs. | |
| --> |
| members = ["user1@dominio.com", "user2@dominio.com"] | ||
| msgraph_roles = ["User.Read.All"] | ||
| redirects = [{ | ||
| platform = "web" |
There was a problem hiding this comment.
Platform casing is inconsistent across examples: here it's \"web\", while _examples/basic uses \"Web\". If the module validates/keys off specific values, this can break copy/paste usage. Standardize the platform values across docs/examples to the exact form expected by the module.
| platform = "web" | |
| platform = "Web" |
| | <a name="provider_time"></a> [time](#provider\_time) | n/a | | ||
|
|
There was a problem hiding this comment.
The Providers table mixes version constraints (~> 3.3.0) with n/a for time, which can be confusing (terraform-docs provider tables typically communicate concrete versions or consistently communicate constraints). Re-run/adjust the docs generation so provider version info is accurate and consistent, or clarify that these are constraints rather than resolved versions.
| | <a name="provider_time"></a> [time](#provider\_time) | n/a | | |
| | <a name="provider_time"></a> [time](#provider\_time) | n/a (no explicit version constraint; latest available will be used) | | |
| _Note: Provider versions shown here are version constraints (from \`versions.tf\`) or an absence of constraint (shown as \`n/a\`), not the exact resolved provider versions._ |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.