Skip to content

Commit 4f27fce

Browse files
Remove unused DDE outputs, add missing DDE_PROFILE_ARN environment variable
1 parent 2e2e3c1 commit 4f27fce

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

infra/app-flask/service/document_data_extraction.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
data "aws_region" "current" {}
2+
data "aws_caller_identity" "current" {}
13
locals {
24
document_data_extraction_config = local.environment_config.document_data_extraction_config
35

46
document_data_extraction_environment_variables = local.document_data_extraction_config != null ? {
57
DDE_INPUT_BUCKET_NAME = "${local.prefix}${local.document_data_extraction_config.input_bucket_name}"
68
DDE_OUTPUT_BUCKET_NAME = "${local.prefix}${local.document_data_extraction_config.output_bucket_name}"
79
DDE_PROJECT_ARN = module.dde[0].bda_project_arn
10+
11+
# aws bedrock data automation requires users to use cross Region inference support
12+
# when processing files. the following like the profile ARNs for different inference
13+
# profiles
14+
# https://docs.aws.amazon.com/bedrock/latest/userguide/bda-cris.html
15+
DDE_PROFILE_ARN = "arn:aws:bedrock:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:data-automation-profile/us.data-automation-v1"
816
} : {}
917
}
1018

infra/app-flask/service/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ locals {
2424
service_name = "${local.prefix}${local.service_config.service_name}"
2525
}
2626

27-
data "aws_region" "current" {}
28-
data "aws_caller_identity" "current" {}
29-
3027
terraform {
3128
required_version = "~>1.10.0"
3229

infra/app-flask/service/outputs.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,4 @@ output "service_endpoint" {
2929

3030
output "service_name" {
3131
value = local.service_name
32-
}
33-
34-
output "dde_input_bucket_name" {
35-
value = local.document_data_extraction_config != null ? "${local.prefix}${local.document_data_extraction_config.input_bucket_name}" : null
36-
}
37-
38-
output "dde_output_bucket_name" {
39-
value = local.document_data_extraction_config != null ? "${local.prefix}${local.document_data_extraction_config.output_bucket_name}" : null
40-
}
41-
42-
# aws bedrock data automation requires users to use cross Region inference support
43-
# when processing files. the following like the profile ARNs for different inference
44-
# profiles
45-
# https://docs.aws.amazon.com/bedrock/latest/userguide/bda-cris.html
46-
output "dde_profile_arn" {
47-
value = local.document_data_extraction_config != null ? "arn:aws:bedrock:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:data-automation-profile/us.data-automation-v1" : null
48-
}
49-
50-
output "dde_project_arn" {
51-
value = local.document_data_extraction_config != null ? module.dde[0].bda_project_arn : null
5232
}

0 commit comments

Comments
 (0)