Search code examples
azure-container-service

How to pass Azure Storage connection string to Container Instance


I have an application that uses Azure Storage Tables that I would like to run in an Azure Container Instance. The Container Instance environment variables (my only option for passing configuration to the application running in the container) only allow alphanumeric and underscores in the quoted string values, and a connection string has things like semicolons and equals. I thought a Key Vault would work, but then I can't pass an application ID either. I can't pass:

  • Connection String
  • URL
  • AppID - UUID
  • base64 data

The only thing I can even think of would be to encode these strings to bytes (UTF-8) and convert the bytes to a hex string, but that's a messy workaround. What is the recommended means of passingconfiguration to an Azure Container Instance?

enter image description here


Solution

  • Update 11/6: We've updated the Azure portal to be more lenient on env var input so strings with special characters like connection strings should work now. Thanks!

    This is currently a constraint of the Azure portal. Please try this deployment via az cli, which should support special characters in env var values.