Skip to content

fix(coderd_ai_provider): fail clearly when server drops Bedrock role_arn#389

Merged
ethanndickson merged 2 commits into
mainfrom
fix/bedrock-role-arn-unsupported-server
Jul 13, 2026
Merged

fix(coderd_ai_provider): fail clearly when server drops Bedrock role_arn#389
ethanndickson merged 2 commits into
mainfrom
fix/bedrock-role-arn-unsupported-server

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Jul 13, 2026

Copy link
Copy Markdown
Member

The role_arn schema docs already note it requires Coder v2.35.0+, but nothing enforced it: on an older server the field is silently dropped (omitempty), round-trips to null, and apply fails with the cryptic "inconsistent values for sensitive attribute" error.

This adds an explicit check in Create/Update — if a requested role_arn comes back empty, we fail with a clear diagnostic telling the user to upgrade or remove it.

Closes #387
Closes ENG-3027

A Coder server older than v2.35.0 accepts the AI provider request but
silently drops the unknown `role_arn` JSON key (`omitempty`), so a
configured value round-trips to null in state. Because the bedrock block
has sensitive/write-only leaves, Terraform surfaces this as the cryptic
"inconsistent values for sensitive attribute" error.

Detect this in Create and Update after the API round-trip: if a
non-empty requested role_arn comes back empty, return an actionable
diagnostic pointing at the version requirement instead.

Closes #387
@ethanndickson ethanndickson merged commit 42f21d5 into main Jul 13, 2026
13 checks passed
@ethanndickson ethanndickson deleted the fix/bedrock-role-arn-unsupported-server branch July 13, 2026 10:30
@linear-code

linear-code Bot commented Jul 13, 2026

Copy link
Copy Markdown

ENG-3027

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coderd_ai_provider - Bedrock Settings produces inconsistent values for sensitive attribute

2 participants