output "bedrock_role_arn" { description = "The ARN of the IAM role for Bedrock" value = try(aws_iam_role.bedrock[0].arn, null) } output "bedrock_role_name" { description = "The name of the IAM role for Bedrock" value = try(aws_iam_role.bedrock[0].name, null) } output "guardrail_id" { description = "The ID of the Bedrock guardrail" value = try(aws_bedrock_guardrail.this[0].guardrail_id, null) } output "guardrail_arn" { description = "The ARN of the Bedrock guardrail" value = try(aws_bedrock_guardrail.this[0].guardrail_arn, null) } output "guardrail_version" { description = "The published version of the Bedrock guardrail (use this with --guardrail-version on the runtime APIs)" value = try(aws_bedrock_guardrail_version.this[0].version, null) } output "log_group_name" { description = "The name of the CloudWatch log group for Bedrock" value = try(aws_cloudwatch_log_group.bedrock[0].name, null) } output "kb_data_bucket_id" { description = "The ID of the S3 bucket for Knowledge Base data" value = try(aws_s3_bucket.kb_data[0].id, null) } output "kb_data_bucket_arn" { description = "The ARN of the S3 bucket for Knowledge Base data" value = try(aws_s3_bucket.kb_data[0].arn, null) } # Knowledge Base outputs output "knowledge_base_id" { description = "The ID of the Bedrock Knowledge Base" value = try(aws_bedrockagent_knowledge_base.this[0].id, null) } output "knowledge_base_arn" { description = "The ARN of the Bedrock Knowledge Base" value = try(aws_bedrockagent_knowledge_base.this[0].arn, null) } output "knowledge_base_role_arn" { description = "The ARN of the IAM role for the Knowledge Base" value = try(aws_iam_role.bedrock_kb[0].arn, null) } output "data_source_id" { description = "The ID of the S3 data source" value = try(aws_bedrockagent_data_source.s3[0].data_source_id, null) } # OpenSearch Serverless outputs output "opensearch_collection_id" { description = "The ID of the OpenSearch Serverless collection" value = try(aws_opensearchserverless_collection.kb[0].id, null) } output "opensearch_collection_arn" { description = "The ARN of the OpenSearch Serverless collection" value = try(aws_opensearchserverless_collection.kb[0].arn, null) } output "opensearch_collection_endpoint" { description = "The endpoint of the OpenSearch Serverless collection" value = try(aws_opensearchserverless_collection.kb[0].collection_endpoint, null) } output "opensearch_dashboard_endpoint" { description = "The dashboard endpoint of the OpenSearch Serverless collection" value = try(aws_opensearchserverless_collection.kb[0].dashboard_endpoint, null) } output "opensearch_collection_name" { description = "The name of the OpenSearch Serverless collection (create the vector index in this collection)" value = try(aws_opensearchserverless_collection.kb[0].name, null) } output "kb_vector_index_name" { description = "The vector index name the Knowledge Base expects in the collection" value = local.enabled && var.create_knowledge_base ? var.kb_vector_index_name : null } output "embedding_model_arn" { description = "The embedding model ARN the Knowledge Base uses" value = local.resolved_embedding_model_arn }