docs(azure-flexible-server-postgresql): update docs and added examples#903
docs(azure-flexible-server-postgresql): update docs and added examples#903pablosanchezpaz wants to merge 4 commits intomainfrom
Conversation
|
Related to #786 |
There was a problem hiding this comment.
Pull request overview
Updates the Azure PostgreSQL Flexible Server module documentation and adds a basic example to make usage clearer and more reproducible.
Changes:
- Added terraform-docs header/footer docs in Spanish with a full YAML usage example.
- Added a basic runnable example (
main.tf+values.yaml) under_examples/basic. - Reworked
README.mdto be terraform-docs injected content with the new header/footer.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-flexible-server-postgresql/docs/header.md | Adds Spanish overview + full YAML example and notes. |
| modules/azure-flexible-server-postgresql/docs/footer.md | Adds support/resource links footer for terraform-docs. |
| modules/azure-flexible-server-postgresql/_examples/basic/values.yaml | Adds a concrete example values file aligned with module inputs. |
| modules/azure-flexible-server-postgresql/_examples/basic/main.tf | Adds a basic Terraform module instantiation example. |
| modules/azure-flexible-server-postgresql/README.md | Switches README to terraform-docs injected content using new header/footer. |
| modules/azure-flexible-server-postgresql/.terraform-docs.yml | Adds terraform-docs configuration to generate/inject README. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| tags_from_rg: true | ||
| key_vault: | ||
| tags: | ||
| value: "tag1" |
There was a problem hiding this comment.
The YAML example indentation is invalid under key_vault.tags (value is not indented enough). This will break parsing/copy-paste usage. Indent value to be a child of tags: (consistent with the vnet.tags block below).
| value: "tag1" | |
| value: "tag1" |
| subnet_name: "example-subnet" | ||
| dns_private_zone_name: "dns.private.zone.example.com" | ||
| administrator_password_key_vault_secret_name: "flexible-server-secret-example-test" | ||
| password_lenght: 10 |
There was a problem hiding this comment.
Typo in the example key: password_lenght should be password_length (as used in _examples/basic/values.yaml and likely expected by the module). As written, users copying the example won’t set the intended input.
| password_lenght: 10 | |
| password_length: 10 |
| version: "15" | ||
| administrator_login: "psqladmin" | ||
| public_network_access_enabled: false | ||
| storage_mb: "65536" |
There was a problem hiding this comment.
In the YAML example, storage_mb is quoted (string) while the example in _examples/basic/values.yaml uses a number. If this YAML is consumed as Terraform input (e.g., via yamldecode), the quotes will force a string and can cause a type mismatch for a numeric variable. Use an unquoted number for consistency and correctness.
| storage_mb: "65536" | |
| storage_mb: 65536 |
| - Para restauración PITR, consulta la sección de la documentación sobre create\_mode. | ||
|
|
There was a problem hiding this comment.
The README references a PITR create_mode documentation section, but the earlier detailed PITR explanation appears to have been removed in this PR. Consider re-adding a short PITR section (required inputs, timestamp format, and the 'don’t keep PointInTimeRestore on subsequent applies' caveat) or linking directly to the relevant Azure/Terraform docs so the note isn’t a dead-end.
| - Para restauración PITR, consulta la sección de la documentación sobre create\_mode. | |
| - Para restauración PITR, consulta la sección siguiente sobre restauración Point-in-Time (PITR). | |
| ## Restauración Point-in-Time (PITR) | |
| Este módulo soporta restauración en un punto en el tiempo (Point-in-Time Restore) para servidores PostgreSQL Flexible existentes. | |
| Para usar PITR, debes configurar los siguientes campos en `postgresql_flexible_server`: | |
| - `create_mode = "PointInTimeRestore"` | |
| - `source_server_id`: ID completo del servidor origen a restaurar. | |
| - `point_in_time_restore_time_in_utc`: marca de tiempo en formato UTC (RFC3339), por ejemplo: `"2025-02-21T09:35:43Z"`. | |
| Ten en cuenta: | |
| - `create_mode = "PointInTimeRestore"` solo debe usarse en la creación inicial del servidor restaurado. | |
| - Después de un `apply` exitoso, es recomendable quitar o cambiar `create_mode` (por ejemplo, a `Default`) para evitar que Terraform intente recrear el servidor en futuros `apply`. | |
| Para más detalles, consulta también: | |
| - Documentación de Terraform para `azurerm_postgresql_flexible_server`: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server | |
| - Conceptos de backup y restauración de Azure Database for PostgreSQL Flexible Server: https://learn.microsoft.com/azure/postgresql/flexible-server/concepts-backup-restore |
|
|
||
| ## Example Usage | ||
| ## Ejemplo completo de uso | ||
|
|
There was a problem hiding this comment.
The README YAML example wraps inputs under a top-level values: key, but _examples/basic/values.yaml is flat (top-level keys). Unless there’s a specific tooling convention requiring values:, this inconsistency can confuse users and lead to non-working configs. Recommend aligning the README example structure with the actual example values file (or explicitly documenting why the values: wrapper is required).
|
|
||
| settings: | ||
| anchor: true | ||
| color: true |
There was a problem hiding this comment.
With output.file set to README.md, enabling color: true can introduce ANSI color codes in some terraform-docs outputs/environments, which would pollute the committed Markdown. Consider setting color: false for deterministic file output.
| color: true | |
| color: false |
No description provided.