feat: Add environment variables to external team_authz commands#6348
Open
david-lawrence-tc wants to merge 5 commits intorunatlantis:mainfrom
Open
feat: Add environment variables to external team_authz commands#6348david-lawrence-tc wants to merge 5 commits intorunatlantis:mainfrom
david-lawrence-tc wants to merge 5 commits intorunatlantis:mainfrom
Conversation
…ternal shell command including * WORKSPACE * API * VERBOSE Signed-off-by: David Lawrence <161499966+david-lawrence-tc@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional context to external team allowlist/authz command executions by exporting more information via environment variables.
Changes:
- Pass
WORKSPACE,API, andVERBOSEenv vars to external team allowlist commands. - Add unit tests covering the new env vars (plus some existing env behaviors).
- Document the newly supported env vars in the permissions docs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
server/core/runtime/external_team_allowlist_runner.go |
Exports WORKSPACE, API, and VERBOSE in the runner’s environment. |
server/core/runtime/external_team_allowlist_runner_test.go |
Adds test coverage for env propagation and runner behavior. |
runatlantis.io/docs/repo-and-project-permissions.md |
Documents the additional env vars available to external commands. |
Signed-off-by: David Lawrence <161499966+david-lawrence-tc@users.noreply.github.com>
Signed-off-by: David Lawrence <161499966+david-lawrence-tc@users.noreply.github.com>
Signed-off-by: David Lawrence <161499966+david-lawrence-tc@users.noreply.github.com>
Signed-off-by: David Lawrence <161499966+david-lawrence-tc@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds additional environment variables to external authz commands:
WORKSPACE- The Terraform workspace used for the project, ex.defaultAPI- "true" if invoked by API endpointsVERBOSE- "true" when the user would like verbose outputwhy
tests
references
closes #6342