-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: aws_bedrockagent_agent
prompt override block causes missing required field, UpdateAgentInput.PromptOverrideConfiguration.PromptConfigurations
error
#37903
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
@kmcduffee-verisk Looking at your error you created the agent without any prompts then updated it to add one? |
@drewtul It seems to happen either way. |
@kmcduffee-verisk Does it happen on the first apply or the second, I can provoke an error by providing some overrides but not all and I've got a fix for this, but I'm not getting the same error as you. |
@kmcduffee-verisk I can reproduce your error, but only by having a block: resource "aws_bedrockagent_agent" "test" {
agent_name = "test"
agent_resource_role_arn = aws_iam_role.test.arn
prepare_agent = true
foundation_model = "anthropic.claude-3-sonnet-20240229-v1:0"
idle_session_ttl_in_seconds = 60
instruction = "Something here"
prompt_override_configuration {
}
} Can you double check you don't have any typo on |
@drewtul Thanks for digging in! Indeed, the issue appears to have been with my prompt template file. In the AWS UI, where the JSON worked fine as-is, there was a newline after the first quote of the I did run into an issue related to #37168 though. It appears that if you do not provide prompt configurations for every prompt (orchestration, pre, knowledge, post), you will get the error noted there. I was only able to get bast that issue doing the following, basically blanking out the other options (since my agent does not use them):
|
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
@kmcduffee-verisk I did encounter the error from #37168 and I've raised a PR to fix that issue with some further tests covering adding/removing and partial prompt configuration. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
1.8.5
AWS Provider Version
5.53.0
Affected Resource(s)
aws_bedrockagent_agent
Expected Behavior
Ability to apply the
aws_bedrockagent_agent
resource with customprompt_override_configuration
.Actual Behavior
Apply does not succeed. The following error appears on
terraform apply
:Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
terraform apply
with the includes resource definition. It will succeed to create the agent if theprompt_override_configuration
is left out.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: