83b72e1dda
* feat: Add Terraform basic-runtime pattern * Modified the Terraform basic-runtime with test script, README, default region * feat: Add Terraform mcp-server-runtime pattern * feat: Add Terraform multi-agent-runtime pattern * feat: Add Terraform end-to-end-weather-agent runtime pattern * Added Terraform main README * Fixed basic runtime test script * docs: add Terraform support to IaC README * Replaced resources to intuitive names, removed hardcoded values, cleaned README * Enhanced Terraform READMEs * Removed unused imports --------- Co-authored-by: Tesfagabir Meharizghi <mehariz@amazon.com>
34 lines
991 B
Terraform
34 lines
991 B
Terraform
# ============================================================================
|
|
# AgentCore Runtime - Main Agent Runtime Resource
|
|
# ============================================================================
|
|
|
|
resource "aws_bedrockagentcore_agent_runtime" "basic_agent" {
|
|
agent_runtime_name = replace("${var.stack_name}_${var.agent_name}", "-", "_")
|
|
description = var.description
|
|
role_arn = aws_iam_role.agent_execution.arn
|
|
|
|
agent_runtime_artifact {
|
|
container_configuration {
|
|
container_uri = "${aws_ecr_repository.agent_ecr.repository_url}:${var.image_tag}"
|
|
}
|
|
}
|
|
|
|
network_configuration {
|
|
network_mode = var.network_mode
|
|
}
|
|
|
|
environment_variables = merge(
|
|
{
|
|
AWS_REGION = var.aws_region
|
|
AWS_DEFAULT_REGION = var.aws_region
|
|
},
|
|
var.environment_variables
|
|
)
|
|
|
|
depends_on = [
|
|
null_resource.trigger_build,
|
|
aws_iam_role_policy.agent_execution,
|
|
aws_iam_role_policy_attachment.agent_execution_managed
|
|
]
|
|
}
|