Skip to content

Azure AppSettings to be made available during build #2725

Description

@JasonKleban

Feature Request

Oryx does a build on the target Static Web App of a vite application, say, but cannot incorporate Azure-configured App Settings during the build.

resource "azurerm_static_web_app" "home" {
  ...

  app_settings = {
    ...
    "VITE_OTHER_DOMAIN" = local.domain_other
  }
}

Something like the above will not be available to Vite during the build as process.env.VITE_OTHER_DOMAIN or import.meta.env.VITE_OTHER_DOMAIN which is the only time we'd have a chance to inject such values in a static web app.

Please add support for something like the following, or please explain how this is already supported?

    - name: Deploy App
      uses: Azure/static-web-apps-deploy@v1
      with:
        azure_static_web_apps_api_token: ...
        action: "upload"
        api_location: "apps/api"
        app_location: "apps/site"
        output_location: "dist"
        include_app_settings_during_build: [ "VITE_OTHER_DOMAIN", ... ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions