This is a set of Azure plugins for Porter.
The plugin is distributed as a single binary, azure. The following snippet will clone this repository, build the binary
and install it to ~/.porter/plugins/.
go get get.porter.sh/plugin/azure/cmd/azure
cd $(go env GOPATH)/src/get.porter.sh/plugin/azure
make build install
After installing the plugin, you must modify your porter configuration file and select which plugin you want to use.
Storage plugins allow Porter to store data, such as claims, parameters and credentials, in Azure’s cloud.
The azure.blob plugin stores data in Azure Blob Storage.
Open, or create, ~/.porter/config.toml.
Add the following line to activate the Azure blob storage plugin:
default-storage-plugin = "azure.blob"
Create a storage account
Create a container named porter.
Copy the connection string for the storage account. Then set it as an environment variable named
Secrets plugins allow Porter to inject secrets into credential or parameter 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 or parameter when you install a bundle.
The azure.keyvault plugin resolves credentials or parameters against secrets in Azure Key Vault.
Open, or create, ~/.porter/config.toml
Add the following lines to activate the Azure keyvault secrets plugin:
default-secrets = "mysecrets"
name = "mysecrets"
plugin = "azure.keyvault"
vault = "myvault"
Create a key vault and set the vault name in the config with name of the vault.
Create a service principal and create an Access Policy on the vault giving Get and List secret permissions.
Using credentials for the service principal set the environment variables: AZURE_TENANT_ID,AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET.