diff --git a/internal/provider/llm_connections_resource.go b/internal/provider/llm_connections_resource.go index 9cfe514..85799c8 100644 --- a/internal/provider/llm_connections_resource.go +++ b/internal/provider/llm_connections_resource.go @@ -166,7 +166,10 @@ func (v llmConnectionConfigValidator) ValidateResource(ctx context.Context, req switch adapter { case "bedrock": - if configStr.IsNull() || configStr.IsUnknown() || configStr.ValueString() == "" { + if configStr.IsUnknown() { + return + } + if configStr.IsNull() || configStr.ValueString() == "" { resp.Diagnostics.AddError( "Config required for bedrock adapter", "The bedrock adapter requires a config JSON string containing a \"region\" key.", diff --git a/internal/provider/llm_connections_resource_unit_test.go b/internal/provider/llm_connections_resource_unit_test.go index 8f744a9..d51b534 100644 --- a/internal/provider/llm_connections_resource_unit_test.go +++ b/internal/provider/llm_connections_resource_unit_test.go @@ -275,6 +275,12 @@ func TestLlmConnectionsResource_ConfigValidator(t *testing.T) { config: tftypes.NewValue(tftypes.String, `{"region":"us-east-1"}`), expectError: false, }, + { + name: "bedrock_unknown_config", + adapter: "bedrock", + config: tftypes.NewValue(tftypes.String, tftypes.UnknownValue), + expectError: false, + }, { name: "google_vertex_ai_missing_location", adapter: "google-vertex-ai",