azure-resource-manager-postgresql-dotnet
Empowers your agent to manage PostgreSQL databases in Azure. It can create, configure, and maintain database servers.
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.
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'.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
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.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill azure-resource-manager-postgresql-dotnetOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/azure-resource-manager-postgresql-dotnet/SKILL.md -o SKILL.mdTechnical 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
- #2363
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets 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.
sickn33/agentic-awesome-skills
Similar skills
clickhouse-io
Helps 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.
affaan-m/ECC
scientific-db-pubmed-database
Helps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.
affaan-m/ECC
scientific-db-uspto-database
Allows the agent to look up official US patent and trademark data. It's useful for intellectual property research.
affaan-m/ECC