Skip to content

Commit

Permalink
Merge pull request #40279 from stefanfreitag/f-aws_bedrockagent_agent…
Browse files Browse the repository at this point in the history
…-update-instructions-validation

feat: update max length for bedrock agent instructions
  • Loading branch information
jar-b authored Dec 4, 2024
2 parents 66b416d + d45b8a3 commit d66c6ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/40279.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_bedrockagent_agent: Increase `instruction` max length for validation to 8000
```
2 changes: 1 addition & 1 deletion internal/service/bedrockagent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (r *agentResource) Schema(ctx context.Context, request resource.SchemaReque
stringplanmodifier.UseStateForUnknown(),
},
Validators: []validator.String{
stringvalidator.LengthBetween(40, 4000),
stringvalidator.LengthBetween(40, 8000),
},
},
"prompt_override_configuration": schema.ListAttribute{ // proto5 Optional+Computed nested block.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/bedrockagent_agent.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The following arguments are optional:
* `description` - (Optional) Description of the agent.
* `guardrail_configuration` - (Optional) Details about the guardrail associated with the agent. See [`guardrail_configuration` Block](#guardrail_configuration-block) for details.
* `idle_session_ttl_in_seconds` - (Optional) Number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
* `instruction` - (Optional) Instructions that tell the agent what it should do and how it should interact with users.
* `instruction` - (Optional) Instructions that tell the agent what it should do and how it should interact with users. The valid range is 40 - 8000 characters.
* `prepare_agent` (Optional) Whether to prepare the agent after creation or modification. Defaults to `true`.
* `prompt_override_configuration` (Optional) Configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html). See [`prompt_override_configuration` Block](#prompt_override_configuration-block) for details.
* `skip_resource_in_use_check` - (Optional) Whether the in-use check is skipped when deleting the agent.
Expand Down

0 comments on commit d66c6ee

Please sign in to comment.