Panic if we cannot set env var

This commit is contained in:
Djordje Lukic 2020-05-04 11:31:44 +02:00
parent 63c460240c
commit e992b4192c
1 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,10 @@ import (
func init() {
// required to get auth.NewAuthorizerFromCLI() to work, otherwise getting "The access token has been obtained for wrong audience or resource 'https://vault.azure.net'."
_ = os.Setenv("AZURE_KEYVAULT_RESOURCE", "https://management.azure.com")
err := os.Setenv("AZURE_KEYVAULT_RESOURCE", "https://management.azure.com")
if err != nil {
panic("unable to set environment variable AZURE_KEYVAULT_RESOURCE")
}
}
func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) (c containerinstance.ContainerGroup, err error) {