Azure PostgreSQL Flexible Server for .NET
Manage Azure PostgreSQL Flexible Server deployments and operations with .NET.
The skill covers Azure resource management, authentication, firewall, backup, and destructive operations such as deletion, exposing external side effects. It lists some environment variables and recommends DefaultAzureCredential, but examples embed an administrator password and connection-string password and use Trust Server Certificate=true; deletion, stopping, failover, and broad Azure-service firewall access lack confirmation, least-privilege guidance, rollback, or recovery instructions. The main risks are visible, but controls for isolation, confirmation, secret handling, and recovery are incomplete, so the score is substantially reduced.
The document supplies multiple C# workflows and basic exception handling, but no skill-specific tests or executable verification are provided. The use of GetDefaultSubscriptionAsync().Result can introduce async blocking, required environment variables are declared but not actually consumed in the examples, and SDK/API version details may be inconsistent. Static evidence supports only a limited plausible happy path; abnormal-input handling and failure diagnostics are thin, keeping the score below 10.
Triggers, target SDK, Flexible Server scope, and scenarios covering servers, databases, firewall, backup, and HA are reasonably clear, and Single Server deprecation is noted. However, non-fit cases, production-versus-development boundaries, regional/version constraints, Chinese-language support, and mainland-China reachability are not addressed, so full marks are not justified.
The skill includes front matter, installation, authentication, resource hierarchy, core workflows, type and SKU/version/HA references, best practices, error handling, related SDKs, and clear license/author metadata. It lacks FAQs, known limitations, a changelog, explicit maintenance ownership, and a clear update path; the 1.0.0 metadata also differs from the body’s v1.2.0 SDK and preview API statements. These governance and consistency gaps reduce the score.
The content covers common PostgreSQL Flexible Server management tasks and offers directly useful reference snippets for experienced Azure SDK developers. However, there is no skill-specific acceptance evidence, build/run evidence, or complete prerequisite coverage; hardcoded secrets, fixed names/regions, and potentially unsafe TLS/firewall choices require substantial review and modification. Under static calibration, the core value is plausible but correctness and direct usability are insufficiently demonstrated.
The skill provides substantial code, type, and version claims, while the repository materials show a generic test harness and CI configuration. They do not provide skill-specific acceptance criteria, test coverage, CI evidence for this path, or third-party execution results. Key API, version, and behavioral claims therefore cannot be independently reproduced from the supplied material, warranting only limited verifiability.
- Do not copy the administrator password or connection-string examples; use secure secret storage, token-based authentication, and avoid Trust Server Certificate=true.
- Deletion, stopping, restarting, failover, scaling, restore, and firewall changes have external effects; add explicit confirmation, permission review, backups, and recovery procedures before execution.
- Before adoption, compile and validate every API, enum, region, and PostgreSQL version against the intended Azure.ResourceManager.PostgreSql version; no skill-specific test evidence is supplied.
- Confirm Azure service reachability in the target environment and document mainland-China network, regional availability, and compliance constraints.
What it does & when to use it
This skill provides .NET guidance for the Azure.ResourceManager.PostgreSql SDK and PostgreSQL Flexible Server. It covers servers, databases, firewall rules, configurations, backups, high availability, Entra ID administrators, read replicas, and lifecycle operations. It also includes authentication, resource hierarchy, SDK type references, error handling, and connection examples. It fits .NET engineers automating Azure PostgreSQL infrastructure through Azure Resource Manager; Single Server is outside its scope and is deprecated.
It shows how to install Azure.ResourceManager.PostgreSql and Azure.Identity, authenticate with ArmClient, and use C# to create, update, list, and delete PostgreSQL Flexible Server resources. The examples also manage databases, IP firewall rules, server parameters, backups, point-in-time restores, read replicas, Entra ID administrators, high availability, scaling, and start/stop/restart operations. It includes password-based and Entra ID token-based PostgreSQL connection examples.
- A .NET infrastructure engineer needs to provision PostgreSQL Flexible Server with selected SKU, storage, backup, and authentication settings.
- A platform team needs to automate PostgreSQL servers, databases, and firewall rules across Azure resource groups.
- A production team needs zone-redundant high availability, an Entra ID administrator, or a read replica.
- A development team needs to stop and start non-production servers or restore a server to a point in time.
- An application team needs to distinguish Azure resource management from PostgreSQL data access through Npgsql.
Pros & cons
- Covers the main PostgreSQL Flexible Server management lifecycle from creation through deletion.
- Provides copyable asynchronous C# examples for authentication, operations, error handling, and connections.
- Includes concrete guidance for DefaultAzureCredential, Entra ID, high availability, backups, and read replicas.
- The repository is MIT-licensed and actively maintained.
- It focuses on PostgreSQL Flexible Server and does not cover Single Server, which is deprecated and scheduled for retirement.
- The examples contain placeholder passwords and resource identifiers; production deployments require their own secret and environment handling.
- The source provides no independent test results or platform coverage for this individual skill.
- The documented API version is 2023-12-01-preview, while the package version is listed as v1.2.0 GA.
How to install
Run npx skills add microsoft/skills and select this skill in the installation wizard. For manual installation, clone https://github.com/microsoft/skills and copy .github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-postgresql-dotnet/ into the target agent's skills directory, such as .github/skills/ for GitHub Copilot. The collection is licensed under MIT.
How to use
After installation, prompt a coding agent with something like: “Use Azure.ResourceManager.PostgreSql and DefaultAzureCredential to create a PostgreSQL Flexible Server with a database, firewall rule, and zone-redundant high availability.” Trigger terms include PostgreSQL, PostgreSqlFlexibleServer, Azure Database for PostgreSQL, PostgreSQL firewall, PostgreSQL backup, and Postgres. Prepare an Azure subscription, resource group, and server name; the examples also use AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, and AZURE_POSTGRESQL_SERVER_NAME.
Compared to similar skills
This skill uses Azure.ResourceManager.PostgreSql for Azure resource management. For application-level PostgreSQL data access, the source lists Npgsql and Npgsql.EntityFrameworkCore.PostgreSQL as related SDKs. Azure.ResourceManager.MySql is a related MySQL management SDK, not an alternative implementation for PostgreSQL.