Skip to content

Commit 6f0b966

Browse files
feat: update AWS credentials handling in claude-code module for bedrock after testing observations
1 parent 1894580 commit 6f0b966

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

registry/coder/modules/claude-code/README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,54 @@ resource "coder_env" "aws_region" {
137137
}
138138
139139
# Option 1: Using AWS credentials
140-
resource "coder_env" "aws_access_key" {
140+
141+
variable "aws_access_key_id" {
142+
type = string
143+
description = "Your AWS access key ID. Create this in the AWS IAM console under 'Security credentials'."
144+
sensitive = true
145+
value = "xxxx-xxx-xxxx"
146+
}
147+
148+
variable "aws_secret_access_key" {
149+
type = string
150+
description = "Your AWS secret access key. This is shown once when you create an access key in the AWS IAM console."
151+
sensitive = true
152+
value = "xxxx-xxx-xxxx"
153+
}
154+
155+
resource "coder_env" "aws_access_key_id" {
141156
agent_id = coder_agent.example.id
142157
name = "AWS_ACCESS_KEY_ID"
143-
value = "your-access-key-id"
158+
value = var.aws_access_key_id
144159
}
145160
146-
resource "coder_env" "aws_secret_key" {
161+
resource "coder_env" "aws_secret_access_key" {
147162
agent_id = coder_agent.example.id
148163
name = "AWS_SECRET_ACCESS_KEY"
149-
value = "your-secret-access-key"
150-
sensitive = true
164+
value = var.aws_secret_access_key"
151165
}
152166
153167
# Option 2: Using Bedrock API key (simpler)
168+
169+
variable "aws_bearer_token_bedrock" {
170+
type = string
171+
description = "Your AWS Bedrock bearer token. This provides access to Bedrock without needing separate access key and secret key."
172+
sensitive = true
173+
value = "xxxx-xxx-xxxx"
174+
}
175+
154176
resource "coder_env" "bedrock_api_key" {
155177
agent_id = coder_agent.example.id
156178
name = "AWS_BEARER_TOKEN_BEDROCK"
157-
value = "your-bedrock-api-key"
158-
sensitive = true
179+
value = var.aws_bearer_token_bedrock
159180
}
160181
161182
module "claude-code" {
162183
source = "registry.coder.com/coder/claude-code/coder"
163184
version = "3.1.1"
164185
agent_id = coder_agent.example.id
165186
workdir = "/home/coder/project"
166-
model = "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
187+
model = "global.anthropic.claude-sonnet-4-5-20250929-v1:0"
167188
}
168189
```
169190

0 commit comments

Comments
 (0)