Skip to content

Latest commit

 

History

History

azure-py-insights

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Azure Native Resource Groups, Workspace and Azure Classic Insights

Deploys resource group & workspace with azure-native and creates insights with azure classic.

Deployment

  1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step)

    az login
  2. Create a new stack:

    pulumi stack init dev
  3. Create a Python virtualenv, activate it, and install dependencies:

    This installs the dependent packages for our Pulumi program.

    python3 -m venv venv
    source venv/bin/activate
    pip3 install -r requirements.txt
  4. Set the confi values via pulumi config set.

    Here are Azure regions see this infographic for a list of available regions)

    pulumi config set azure-native:location eastus2
  5. Run pulumi up to preview and deploy changes: You must select y to continue

    pulumi up

    Results

    Updating (dev)
    
    View Live: https://app.pulumi.com/shaht/azure-py-insights/dev/updates/6
    
        Type                                              Name                                Status      
    +   pulumi:pulumi:Stack                               azure-py-insights-dev               created     
    +   └─ azure-native:resources:ResourceGroup           demo-rg                             created     
    +      ├─ azure-native:operationalinsights:Workspace  demo-operationalinsights-workspace  created     
    +      └─ azure:appinsights:Insights                  demo-Insights                       created     
    
    Outputs:
        insights_id                       : "demo-insightsff5813fa"
        operationalinsights_workspace_name: "demo-operationalinsights-workspace55e4a7fc"
        resource_group_name               : "demo-rgdbd5593e"
    
    Resources:
        + 4 created
    
    Duration: 1m35s
  6. View the outputs created via pulumi stack output

    pulumi stack output

    Results

    Current stack outputs (3):
    OUTPUT                              VALUE
    insights_id                         demo-insightsff5813fa
    operationalinsights_workspace_name  demo-operationalinsights-workspace55e4a7fc
    resource_group_name                 demo-rgdbd5593e
  7. Clean Up

    pulumi destroy -y
  8. Remove the stack. This will remove the Pulumi.dev.yaml file also

    pulumi stack rm dev