Skip to content

docs(azure-flexible-server-postgresql): update docs and added examples#903

Draft
pablosanchezpaz wants to merge 4 commits intomainfrom
add/azure-flexible-server-postgresql-docs
Draft

docs(azure-flexible-server-postgresql): update docs and added examples#903
pablosanchezpaz wants to merge 4 commits intomainfrom
add/azure-flexible-server-postgresql-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 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.md to 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"
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 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).

Suggested change
value: "tag1"
value: "tag1"

Copilot uses AI. Check for mistakes.
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
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.

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.

Suggested change
password_lenght: 10
password_length: 10

Copilot uses AI. Check for mistakes.
version: "15"
administrator_login: "psqladmin"
public_network_access_enabled: false
storage_mb: "65536"
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.

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.

Suggested change
storage_mb: "65536"
storage_mb: 65536

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +71
- Para restauración PITR, consulta la sección de la documentación sobre create\_mode.

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

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

Copilot uses AI. Check for mistakes.

## Example Usage
## Ejemplo completo de uso

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

Copilot uses AI. Check for mistakes.

settings:
anchor: true
color: true
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.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.

Suggested change
color: true
color: false

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