az login
Use pulumi new to scaffold a Python Pulumi project for Azure. Install dependencies and configure your first stack.
1 #!/bin/bash 2 3 # Create project directory 4 mkdir myapp-infra && cd myapp-infra 5 6 # Create Python virtual environment 7 python -m venv venv 8 source venv/bin/activate 9 10 # Scaffold Pulumi project 11 pulumi new azure-python \ 12 --name myapp \ 13 --stack dev \ 14 --description "MyApp Azure Infrastructure" 15 16 # Install Python dependencies 17 pip install -r requirements.txt 18 19 # Configure stack 20 pulumi config set azure-native:location eastus 21 pulumi config set environment dev 22 23 # Preview (should show resources from template) 24 pulumi preview
Pulumi project scaffolded; pulumi preview runs without error
Sign in to share your feedback and join the discussion.