hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.53k stars 4.6k forks source link

Support for Setting Environment Variables in Startup Command for Azure Web App #25798

Open levitin opened 4 months ago

levitin commented 4 months ago

Is there an existing issue for this?

Community Note

Description

I am trying to set environment variables in the startup command for an Azure App Service using azurerm_linux_web_app. Specifically, I want to configure a Docker container with an environment variable in the startup command to trigger a maven profile.

Expected Behavior

The expected behavior is that the startup command should be able to set environment variables for Docker, similar to the following:

docker run -d --expose=8080 -e VARIABLE=false mydomain.azurecr.io/image-name:latest 

Actual Behavior Currently, it seems that the startup command does not support setting environment variables in this manner. As a result, I'm unable to configure my container to use specific environment variables.

New or Affected Resource(s)/Data Source(s)

azurerm_linux_web_app

Setting Environment Variable over Portal

webapp

Potential Terraform Configuration

No response

References

No response

alainkaiser commented 1 week ago

Would love to see this as well, maybe in the site_config section :)