Skip to content

Latest commit

 

History

History

azure-py-storage-account-networkrulesetresponseargs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Azure Key Vault with AppServicePlan and WebApp in Python

This example deploys a resource group, and a storage account, and has a workaround for the following issue storage account NetworkRuleSetResponseArgs has no attribute.

Deploying the App

  1. Initialize a new stack called dev via pulumi stack init.

    pulumi stack init dev
  2. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):

    az login
  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 config 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

        View Live: https://app.pulumi.com/shaht/azure-py-storage-account-networkrulesetresponseargs/dev/previews/c5d344d9-8b00-418f-9708-501359137da7
    
        Type                                     Name                                                  
    +   pulumi:pulumi:Stack                      azure-py-storage-account-networkrulesetresponseargs-de
    +   ├─ azure-native:resources:ResourceGroup  resource_group                                    
    +   └─ azure-native:storage:StorageAccount   sa                                                
    
    Outputs:
        primary_storage_key: output<string>
    
    Resources:
        + 3 to create
    
    Updating (dev)
    
    View Live: https://app.pulumi.com/shaht/azure-py-storage-account-networkrulesetresponseargs/dev/updates/1
    
        Type                                     Name                                                  
    +   pulumi:pulumi:Stack                      azure-py-storage-account-networkrulesetresponseargs-de
    +   ├─ azure-native:resources:ResourceGroup  resource_group                                    
    +   └─ azure-native:storage:StorageAccount   sa                                                
    
    Outputs:
        primary_storage_key: [secret]
    
    Resources:
        + 3 created
    
    Duration: 31s
  6. View the outputs.

    pulumi stack output

    Results

     Current stack outputs (1):
     OUTPUT               VALUE
     primary_storage_key  [secret]

    If you need to see the values for the primary key of the storage account, you will have to do the following

    pulumi stack output --show-secrets
  7. Clean up

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

    pulumi stack rm dev -y