Skip to content

Conversation

@AndreasSko
Copy link

Description

At the moment, the CLAUDE_API_KEY coder_env will always be created, even if the variable itself is not. This can lead to the environment variable being unset if it has been set outside of Terraform.

With this PR, we make the claude_api_key coder_env conditional, so it will only be created if an API key has been set.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/claude-code/main.tf
New version: v4.7.2
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

None

At the moment, the `CLAUDE_API_KEY` coder_env will always be created,
even if the variable itself is not. This can lead to the environment
variable being unset if it has been set outside of Terraform.

With this PR, we make the `claude_api_key` coder_env conditional, so it
will only be created if an API key has been set.
@matifali matifali requested a review from 35C4n0r January 30, 2026 17:54
@35C4n0r 35C4n0r added the version:patch Add to PRs requiring a patch version upgrade label Feb 2, 2026
Copy link
Collaborator

@35C4n0r 35C4n0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndreasSko, LGTM, can you pull and run ./.github/scripts/version-bump.sh patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Add to PRs requiring a patch version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants