added resource env variables in service for convox run command - fix/convox-run-resource-env-vars #3739
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.
What is the feature/fix?
Fix: Include All Resource-Specific Environment Variables in
convox run
CommandsWe have updated the
convox run
command to include all resource-specific environment variables for services created by the command. Previously, only the olderX_URL
environment variable was included. Now, all relevant environment variables are automatically added to the ECS Task definition for the service, ensuring comprehensive access to resource credentials and configurations.Why is this important?
This update ensures that when executing commands with
convox run
, all necessary environment variables are available to the service container. This update includes the following variables for each resource defined in yourconvox.yml
:X_URL=
X_USER=
X_PASS=
X_HOST=
X_PORT=
X_NAME=
Where
X
represents the name of the resource as defined inconvox.yml
.Does it have a breaking change?
There are no breaking changes introduced with this fix.
How to use/test it?
Update your rack to the latest version (20240829164739 or later):
Run any command with
convox run
and verify the environment variables are present:Requirements
To use this fix, you must be on at least rack version
20240829164739
.You can check your rack's version with the command
convox rack -r rackName
.Update your rack to the latest version with the command
convox rack update -r rackName
.