
poc pulumi mcp
使用 Pulumi 和 Python 实现模块化的 Azure Hub 和 Spoke 网络架构。
Repository Info
About This Server
使用 Pulumi 和 Python 实现模块化的 Azure Hub 和 Spoke 网络架构。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Azure Hub and Spoke Network Architecture
This project implements a modular Azure Hub and Spoke network architecture using Pulumi and Python, following the Azure Well-Architected Framework principles.
Project Structure
.
├── modules/
│ ├── network/ # Virtual Network and subnet management
│ └── network_security/ # Network Security Group management
├── __main__.py # Main infrastructure entry point
└── requirements.txt # Python dependencies
Modules
Network Module
- Manages Virtual Networks and Subnets
- Provides VNet peering functionality
- Supports custom subnet configurations
Network Security Module
- Manages Network Security Groups (NSGs)
- Configurable security rules
- Reusable across different environments
Setup
- Create a Python virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use: .\venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure your Azure credentials:
az login
- Create a new stack:
pulumi stack init dev
- Configure the stack:
pulumi config set location eastus
- Deploy:
pulumi up
Module Configuration Examples
Creating a Virtual Network
network = VirtualNetwork('hub', {
'name': 'hub',
'location': 'eastus',
'environment': 'dev',
'resource_group_name': resource_group.name,
'address_space': ['10.0.0.0/16'],
'subnets': [
{
'name': 'subnet1',
'address_prefix': '10.0.1.0/24'
}
]
})
Creating a Network Security Group
nsg = NetworkSecurityGroup('example', {
'name': 'example',
'location': 'eastus',
'environment': 'dev',
'resource_group_name': resource_group.name,
'rules': [{
'name': 'allow-internal',
'priority': 100,
'direction': 'Inbound',
'access': 'Allow',
'protocol': '*',
'source_port_range': '*',
'destination_port_range': '*',
'source_address_prefix': 'VirtualNetwork',
'destination_address_prefix': 'VirtualNetwork'
}]
})
Quick Start
Clone the repository
git clone https://github.com/hecedu11/poc-pulumi-mcpInstall dependencies
cd poc-pulumi-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.