Description
Terraform Core Version
1.6.6
AWS Provider Version
5.76.0
Affected Resource(s)
validation currently throws the following error for instruction lengths greater than 4000. "Attribute instruction string length must be between 40 and 4000, got: 4036"
Amazon increased the agent instruction limit to 8000 characters. The validator needs to be updated.
While the above screenshot shows the AWS Service Quota indicating 8000 characters, the AWS API reference documentation seems to lag behind at 4000 characters:
Here's the specific code block:
Expected Behavior
The validator should allow up to 8000 characters
Actual Behavior
validation currently throws the following error for instruction lengths greater than 4000. "Attribute instruction string length must be between 40 and 4000, got: 4036"
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
resource "aws_bedrockagent_agent" "this" {
agent_name = "agent"
agent_resource_role_arn = "arn:aws:..."
foundation_model = var.agent_foundation_model
instruction = "instructions located here with more than 4000 characters"
}
Steps to Reproduce
You just need to check the validator settings in code and compare to AWS documentation https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html#quotas-agents
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None