mirsaeedi / dotnet-apim

dotnet-apim is a cross-platform dotnet tool which streamlines the CI/CD process of deploying APIs into Azure API Management
MIT License
31 stars 10 forks source link

ARM template parameters in config #22

Closed roy-uijting closed 2 years ago

roy-uijting commented 4 years ago

Hi,

Is it possible to use ARM parameters in the config file? For our backend we make use of Azure Functions with function keys. Function keys are secret and are not allowed to be stored in our repository (e.g. config files). That's why we prefer to use parameters in our ARM deployment. Is this already existing functionality? If so, can you please explain how that works? If not, is there an alternative way to change parameters / variables in config files over different environments?

Thanks in advance.

mirsaeedi commented 2 years ago

Hello. There are three ways to customize deployments via variables.

  1. Define variables in a file and pass it to the tool: dotnet-apim -c "c:/apim/definition.yml" -f "c:/apim/replace.yml"
  2. You can store values in your ADO pipeline or keyvault. Have a powershell script to read them and pass them to the tool: dotnet-apim -c "c:/apim/definition.yml" -s "apimInstanceName=value1;apimFolder=value2;uploadLocation=value3"
  3. Use APIM NameValue type.

Sorry for the super late reply. Let me know if you need more help on this.