azure-resource-manager-postgresql-dotnet
What it does
This tool helps you manage PostgreSQL databases in Azure. You can create servers, databases, and set up access rules.
When to use it
- βWhen you need to create a new PostgreSQL database server.
- βWhen you want to add a new database to an existing server.
- βWhen you need to allow specific IP addresses to access your database.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-resource-manager-postgresql-dotnet/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate a PostgreSQL server named 'my-db' in the East US region with username 'admin' and password 'password123'.β
5 new skills a week. 1 minute to read.
How it works
You write code in .NET that uses Microsoft's instructions to talk to Azure. This lets you automate the creation and setup of your PostgreSQL databases.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Azure.ResourceManager.PostgreSql (.NET)
Azure Resource Manager SDK for managing PostgreSQL Flexible Server deployments.
Installation
dotnet add package Azure.ResourceManager.PostgreSql
dotnet add package Azure.Identity
Current Version: v1.2.0 (GA)
API Version: 2023-12-01-preview
Note: This skill focuses on PostgreSQL Flexible Server. Single Server is deprecated and scheduled for retirement.
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id>
AZURE_RESOURCE_GROUP=<your-resource-group>
AZURE_POSTGRESQL_SERVER_NAME=<your-postgresql-server>
Authentication
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.PostgreSql;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
ArmClient client = new ArmClient(new DefaultAzureCredential());
Resource Hierarchy
Subscription
βββ ResourceGroup
βββ PostgreSqlFlexibleServer # PostgreSQL Flexible Server instance
βββ PostgreSqlFlexibleServerDatabase # Database within the server
βββ PostgreSqlFlexibleServerFirewallRule # IP firewall rules
βββ PostgreSqlFlexibleServerConfiguration # Server parameters
βββ PostgreSqlFlexibleServerBackup # Backup information
βββ PostgreSqlFlexibleServerActiveDirectoryAdministrator # Entra ID admin
βββ PostgreSqlFlexibleServerVirtualEndpoint # Read replica endpoints
Core Workflows
1. Create PostgreSQL Flexible Server
using System;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
ResourceGroupResource resourceGroup = await client
.GetDefaultSubscriptionAsync()
.Result
.GetResourceGroupAsync("my-resource-group");
PostgreSqlFlexibleServerCollection servers = resourceGroup.GetPostgreSqlFlexibleServers();
PostgreSqlFlexibleServerData data = new PostgreSqlFlexibleServerData(AzureLocation.EastUS)
{
Sku = new PostgreSqlFlexibleServerSku("Standard_D2ds_v4", PostgreSqlFlexibleServerSkuTier.GeneralPurpose),
AdministratorLogin = "pgadmin",
AdministratorLoginPassword = Environment.GetEnvironmentVariable("POSTGRES_ADMIN_PASSWORD") ?? throw new InvalidOperationException("POSTGRES_ADMIN_PASSWORD is required"),
Version = PostgreSqlFlexibleServerVersion.Ver16,
Storage = new PostgreSqlFlexibleServerStorage
{
StorageSizeInGB = 128,
AutoGrow = StorageAutoGrow.Enabled,
Tier = PostgreSqlStorageTierName.P30
},
Backup = new PostgreSqlFlexibleServerBackupProperties
{
BackupRetentionDays = 7,
GeoRedundantBackup = PostgreSqlFlexibleServerGeoRedundantBackupEnum.Disabled
},
HighAvailability = new PostgreSqlFlexibleServerHighAvailability
{
Mode = PostgreSqlFlexibleServerHighAvailabilityMode.ZoneRedundant,
StandbyAvailabilityZone = "2"
},
AvailabilityZone = "1",
AuthConfig = new PostgreSqlFlexibleServerAuthConfig
{
ActiveDirectoryAuth = PostgreSqlFlexibleServerActiveDirectoryAuthEnum.Enabled,
PasswordAuth = PostgreSqlFlexibleServerPasswordAuthEnum.Enabled
}
};
ArmOperation<PostgreSqlFlexibleServerResource> operation = await servers
.CreateOrUpdateAsync(WaitUntil.Completed, "my-postgresql-server", data);
PostgreSqlFlexibleServerResource server = operation.Value;
Console.WriteLine($"Server created: {server.Data.FullyQualifiedDomainName}");
2. Create Database
PostgreSqlFlexibleServerResource server = await resourceGroup
.GetPostgreSqlFlexibleServerAsync("my-postgresql-server");
PostgreSqlFlexibleServerDatabaseCollection databases = server.GetPostgreSqlFlexibleServerDatabases();
PostgreSqlFlexibleServerDatabaseData dbData = new PostgreSqlFlexibleServerDatabaseData
{
Charset = "UTF8",
Collation = "en_US.utf8"
};
ArmOperation<PostgreSqlFlexibleServerDatabaseResource> operation = await databases
.CreateOrUpdateAsync(WaitUntil.Completed, "myappdb", dbData);
PostgreSqlFlexibleServerDatabaseResource database = operation.Value;
Console.WriteLine($"Database created: {database.Data.Name}");
3. Configure Firewall Rules
PostgreSqlFlexibleServerFirewallRuleCollection firewallRules = server.GetPostgreSqlFlexibleServerFirewallRules();
// Allow specific IP range
PostgreSqlFlexibleServerFirewallRuleData ruleData = new PostgreSqlFlexibleServerFirewallRuleData
{
β¦
FAQ
What is a 'Flexible Server'?
It's a type of PostgreSQL server in Azure that gives you more flexibility and control over its configuration and resources.
What are 'firewall rules'?
These are rules that define which IP addresses can connect to your database, helping to keep it secure.
Can I manage existing databases?
Yes, the tool allows you to create new databases and also configure or modify existing servers and rules.
Details
Original description by the author
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3977
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.