-
Notifications
You must be signed in to change notification settings - Fork 270
feat(serverless): Injected environment variables - use macro for variables priority MTA-6902 #6214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
019f79d
feat(serverless): Injected environment variables - use macro for var…
Loic-kd db44977
feat(serverless): typo correction
Loic-kd a2c2988
feat(serverless): create page and menu entry
Loic-kd c762ab9
feat(serverless): delete table
Loic-kd 086c0c9
Update macros/developer-tools/scaleway-environment-variables.mdx
Loic-kd 4c706af
Update pages/serverless-jobs/reference-content/injected-environment-v…
Loic-kd bfe4b62
feat(serverless): fix environment variables macro
Loic-kd d310772
feat(serverless): add restriction note
Loic-kd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| macro: environment-variables-priority | ||
| --- | ||
|
|
||
| ## Environment variables priority | ||
|
|
||
| When the same environment variable is injected by multiple sources, the Scaleway infrastructure follows a precedence rule to determine the value for that variable. | ||
|
|
||
| The order of precedence, from highest to lowest is the following. | ||
|
|
||
| 1. Environment variables defined in your command-line environment. | ||
|
|
||
| 2. Static variables (i.e. variables set in a Terraform/OpenTofu configuration file). | ||
|
|
||
| 3. Variables defined in the [Scaleway configuration file](/scaleway-sdk/reference-content/scaleway-configuration-file/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
pages/serverless-jobs/reference-content/injected-environment-variables.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| title: Injected environment variables | ||
| description: This page contains a list of environment variables injected by default in the Job Runs. | ||
| tags: serverless jobs environment variables | ||
| dates: | ||
| validation: 2026-02-16 | ||
| posted: 2026-02-16 | ||
| --- | ||
| import EnvironmentVariablesPriority from '@macros/developer-tools/environment-variables-priority.mdx' | ||
|
|
||
| The following standardized Scaleway environment variables are injected by default in the Job runs to improve and optimize data management. | ||
|
|
||
| | Variable name | Description | Sample value | | ||
| | :--------------------------- | :------------------------------------- | :------------------------------------- | | ||
| | `$SCW_SLS_RESOURCE_ID` | ID of the Job run | `00000000-0000-0000-0000-000000000000` | | ||
| | `$SCW_SLS_PARENT_ID` | ID of the Job definition | `00000000-0000-0000-0000-000000000000` | | ||
| | `$SCW_SLS_RESOURCE_NAME` | Name of the Job run | `"job-name"` | | ||
| | `$SCW_SLS_PROJECT_ID` | ID of the Project of the Job | `00000000-0000-0000-0000-000000000000` | | ||
| | `$SCW_SLS_ORGANIZATION_ID` | ID of the Organization of the Job | `00000000-0000-0000-0000-000000000000` | | ||
| | `$SCW_SLS_CPU` | vCPU limit of the Job run | `560` | | ||
| | `$SCW_SLS_RAM` | Memory limit of the Job run | `1024` | | ||
| | `$SCW_SLS_EPHEMERAL_STORAGE` | Ephemeral storage limit of the Job run | `1000` | | ||
| | `$SCW_SLS_IMAGE` | Image of the Job run | `scaleway/cli:latest` | | ||
| | `$SCW_SLS_REGION` | Region of the Job run | `fr-par` | | ||
|
|
||
| <EnvironmentVariablesPriority/> | ||
Loic-kd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.