Skip to content

Latest commit

 

History

History

azure-classic-py-insights

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Azure Native and Azure Classic Resource Groups, Workspace, and Insights

Deploys resource groups, workspace, and insights with azure classic. 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
    pulumi config set azure: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/myuser/azure-classic-py-insights/dev/updates/11
    
        Type                                                Name                           Status      
    +   pulumi:pulumi:Stack                                 azure-classic-py-insights-dev  created     
    +   ├─ azure:core:ResourceGroup                         resource_group                 created     
    +   │  ├─ azure:operationalinsights:AnalyticsWorkspace  workspace                      created     
    +   │  └─ azure:appinsights:Insights                    insights                       created     
    +   └─ azure-native:resources:ResourceGroup             native-rg                      created     
    +      ├─ azure-native:operationalinsights:Workspace    native-workspace               created     
    +      └─ azure:appinsights:Insights                    insightsmixed                  created     
    
    Outputs:
        azure_native_resource_group_name: "native-rg45f3b003"
        azure_native_workspace_name     : "native-workspace2d6e3444"
        insight_name                    : "insightsfd750b60"
        insights_mixed                  : "insightsmixedc49b30ac"
        resource_group_name             : "resource_group7d05c29e"
        workspace_id                    : "[secret]"
        workspace_name                  : "workspace679fec6"
    
    Resources:
        + 7 created
    
    Duration: 2m4s
    
  6. View the outputs created via pulumi stack output

    pulumi stack output

    Results

    Current stack outputs (7):
    OUTPUT                            VALUE
    azure_native_resource_group_name  native-rg45f3b003
    azure_native_workspace_name       native-workspace2d6e3444
    insight_name                      insightsfd750b60
    insights_mixed                    insightsmixedc49b30ac
    resource_group_name               resource_group7d05c29e
    workspace_id                      [secret]
    workspace_name                    workspace679fec6
  7. Destroy the network and subnet. Make sure all your OTHER stacks that depend on this network have their resources all deleted BEFORE you clean up any networking resources.

    pulumi destroy -y
  8. Remove the stack

    pulumi stack rm dev