Fix AI agent modules to use coder_env instead of coder_agent env #159
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.
Fixes #128
This PR updates AI coding modules to use the
coder_env
resource for setting environment variables instead of recommending users set them on thecoder_agent
resource.Changes Made
Updated Modules:
coder_env
resource for AI provider API keys, removedexport
commands from shell scriptscoder_env
resources for API key and prompts, updated documentationcoder_env
resources for prompts and API key, updated documentationDocumentation Updates:
coder_agent
resourceBenefits
✅ Reduced cognitive load: Users no longer need to manually configure environment variables on
coder_agent
✅ Cleaner approach: Environment variables are managed within the modules themselves
✅ Consistent pattern: All AI modules now follow the same pattern for environment variable management
✅ Better encapsulation: Module internals are hidden from users
Testing
terraform validate
@DevelopmentCats