メインコンテンツまでスキップ

「Extend App」の環境変数とシークレット

Last updated on April 29, 2026

Overview

Extend apps publish gRPC services — interfaces that AGS calls to run your custom logic instead of its default behavior. Each app has default Environment Secret Configuration and Environment Variable Configuration values, shown in the image below.

click to see configuration

This guide explains how to add, update, and delete environment secrets and variables for your Extend app.

Configure environment secrets

Add a new environment secret configuration

  1. Use the Environment.GetEnvironmentVariable method anywhere you need to read environment variable. For example, get the value from the secret for the NEW_SECRET_URL as shown below:
string? newSecretUrl = Environment.GetEnvironmentVariable("NEW_SECRET_URL");
if (newSecretUrl == null)
{
//do something here
}
注記

If docker-compose is used, add the new variable NEW_SECRET_URL in the docker-compose.yaml file under the environment: section.

services:
app:
build:
...
environment:
...
- NEW_SECRET_URL
  1. Re-deploy the gRPC server latest image to the cluster. Make sure the code is updated. Image shows Deploy confirmation message

  2. Click Add Secret to add NEW_SECRET_URL as the key and its value. Then click Add. click to add secret

  3. After it's successfully added, finish by clicking Restart and Apply.

Update an existing environment secret configuration

  1. Click edit icon on the left side of the secret value, adjust the value according to the need, then click Save. click to update secret

  2. After it's successfully updated, finish by clicking Restart and Apply.

Delete an existing environment secret configuration

  1. Click on the trash icon beside the environment secret, then click on the Delete button on the confirmation message that appears.

  2. Click on the Restart and Apply button to apply the changes to the Extend app.

Configure environment variables

Add a new environment variable configuration

  1. Use Environment.GetEnvironmentVariable method anywhere to read environment variable. For example, get the value from secret for the NEW_ENVAR_URL as shown below:
string? newVarUrl = Environment.GetEnvironmentVariable("NEW_ENVAR_URL");
if (newVarUrl == null)
{
//do something here
}
注記

If docker-compose is used, add the new variable NEW_ENVAR_URL in the docker-compose.yaml file under the environment: section.

services:
app:
build:
...
environment:
...
- NEW_ENVAR_URL
  1. Re-deploy the gRPC server latest image to the cluster. Make sure the code is updated. Image shows Deploy confirmation message

  2. Click Add Variable to add NEW_ENVAR_URL as the key and its value. Then click Add. click to add envar

  3. After successfully added, finish it by clicking the Restart and Apply button on the right side of the page.

Update an existing environment variable configuration

  1. Click the edit icon on the left side of the variable value, adjust the value, and click Save. click to update envar

  2. After it's successfully updated, finish by clicking Restart and Apply.

Delete an existing environment variable configuration

  1. Click on the trash icon beside the variable and click on the Delete button on the confirmation message that appears.

  2. Click on the Restart and Apply button to apply the changes to the Extend app.