forked from awslabs/amazon-bedrock-agentcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
33 lines (28 loc) · 991 Bytes
/
main.tf
File metadata and controls
33 lines (28 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# ============================================================================
# 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
]
}