# Manage Azure PostgreSQL with .NET

Managing PostgreSQL Flexible Server through the Azure .NET SDK requires many resource-specific APIs. This skill provides focused patterns for common provisioning and operations tasks.

## Install

```bash
npx skillstore add sickn33/azure-resource-manager-postgresql-dotnet
```

## Metadata

- Status: approved
- Slug: sickn33-azure-resource-manager-postgresql-dotnet
- Skillstore revision: r2
- Version status: missing
- Tree hash: 27bc427f2295f367941b7eb8aea0d880da227ff447ed91984cfeb8063d68461e
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-resource-manager-postgresql-dotnet
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/sickn33-azure-resource-manager-postgresql-dotnet
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-azure-resource-manager-postgresql-dotnet/manifest

## Capabilities

- Shows package installation and DefaultAzureCredential authentication for the Azure Resource Manager client.
- Provides C\# patterns for creating Flexible Servers, databases, read replicas, and restored servers.
- Demonstrates firewall rules, server parameters, Entra ID administrators, backups, and high availability settings.
- Covers server listing, scaling, start, stop, restart, failover, and deletion operations.
- Lists relevant SDK types, PostgreSQL versions, SKU tiers, and related packages.
- Includes Azure error handling and password or Entra token connection approaches.

## Use Cases

- Provision a Development Database: Generate a reviewed C\# workflow for a Flexible Server, database, storage, backups, and authentication.
- Standardize Production Configuration: Draft infrastructure code for high availability, Entra ID, firewall boundaries, and server parameters.
- Plan Database Operations: Compare SDK patterns for scaling, replicas, backups, point-in-time restore, and controlled lifecycle actions.

## Prompt Templates

### Authenticate to Azure

```
Show the minimum C# setup for ArmClient with DefaultAzureCredential. Use subscription ID [subscription-id] and explain required local authentication.
```

### Create a Flexible Server

```
Draft C# to create PostgreSQL 16 server [server-name] in [region]. Use secret-backed credentials, [sku], [storage-gb], backups, and no broad firewall rule.
```

### Configure Secure Production Access

```
Create a production configuration for server [server-name]. Include Entra ID, private networking guidance, zone-redundant availability, backup retention, and least-privilege firewall settings.
```

### Design a Restore and Replica Workflow

```
Design an idempotent C# workflow for point-in-time restore and a cross-region read replica. Include validation, failure handling, cost impacts, and rollback steps.
```

## Limitations

- Examples require valid Azure credentials, permissions, subscription details, and environment-specific resource names.
- The skill does not deploy resources or verify code against a live Azure subscription by itself.
- Some examples use a preview Azure API version and may differ from current SDK behavior.
- Provisioning, scaling, restoring, and deleting servers can create costs or service disruption.

## Best Practices

- Use DefaultAzureCredential and store passwords in Azure Key Vault or another approved secret provider.
- Prefer private networking and narrowly scoped firewall ranges for production servers.
- Validate subscription, resource group, region, costs, and destructive actions before applying changes.

## Anti Patterns

- Do not hardcode administrator passwords or access tokens in source code or connection strings.
- Do not use the 0.0.0.0 Azure-services firewall rule without a documented security review.
- Do not run delete, restore, failover, or scaling operations without explicit confirmation and recovery planning.

## Security Audit

- Audited at: 2026-07-23T22:30:16.992\+00:00
- Summary: Most static alerts are false positives caused by Markdown fences, inline code, official documentation URLs, and example private addresses. The 0.0.0.0 firewall example is a confirmed medium risk because it enables broad Azure-services access. A separate medium finding covers a hardcoded password example and disabled certificate validation.

## Stats

- Views: 93
- Downloads: 9
- Favorites: 0
- Popularity score: 0
