Azure Plugin

Integrate Porter with Azure Cloud.

Source: https://github.com/getporter/azure-plugins

Install or Upgrade

porter plugin install azure

Plugin Configuration

Storage

Storage plugins allow Porter to store data, such as installation data and credentials or parameters, in Azure cloud.

Blob

The azure.blob plugin stores data in Azure Blob Storage.

  1. Open, or create, ~/.porter/config.toml.

  2. Add the following line to activate the Azure blob storage plugin:

    default-storage-plugin = "azure.blob"
    
  3. Create a storage account

  4. Create a container named porter.

  5. Copy the connection string for the storage account. Then set it as an environment variable named AZURE_STORAGE_CONNECTION_STRING.

Secrets

Secrets plugins allow Porter to inject secrets into credential sets.

For example, if your team has a shared key vault with a database password, you can use the keyvault plugin to inject it as a credential when you install a bundle.

Key Vault

The azure.keyvault plugin resolves credentials against secrets in Azure Key Vault.

  1. Open, or create, ~/.porter/config.toml

  2. Add the following lines to activate the Azure keyvault secrets plugin:

    default-secrets = "mysecrets"
       
    [[secrets]]
    name = "mysecrets"
    plugin = "azure.keyvault"
       
    [secrets.config]
    vault = "myvault"
    
  3. Create a key vault and set the vault name in the config with name of the vault.

  4. Create a service principal and create an Access Policy on the vault giving Get and List secret permissions.

  5. Using credentials for the service principal set the environment variables: AZURE_TENANT_ID,AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET.