generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_data.tf
61 lines (51 loc) · 1.97 KB
/
_data.tf
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
data "aws_caller_identity" "current" {}
data "aws_iam_policy_document" "assume_role" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com", "ecs-tasks.amazonaws.com"]
}
}
}
data "aws_iam_policy_document" "ecr_viewer_s3" {
statement {
actions = [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:ListBucket",
]
resources = [
aws_s3_bucket.ecr_viewer.arn,
"${aws_s3_bucket.ecr_viewer.arn}/*",
]
}
}
data "aws_iam_policy" "ecs_task_execution" {
name = "AmazonECSTaskExecutionRolePolicy"
}
data "aws_iam_policy" "amazon_ec2_container_service_for_ec2_role" {
name = "AmazonEC2ContainerServiceforEC2Role"
}
data "aws_route_table" "this" {
for_each = local.private_subnet_kvs
subnet_id = each.value
}
data "aws_secretsmanager_secret_version" "postgres_database_url" {
count = local.database_data.metadata_database_type == "postgres" ? 1 : 0
secret_id = local.database_data.metadata_database_type == "postgres" ? local.database_data.secrets_manager_postgres_database_url_name : ""
}
data "aws_secretsmanager_secret_version" "sqlserver_user" {
count = local.database_data.metadata_database_type == "sqlserver" ? 1 : 0
secret_id = local.database_data.metadata_database_type == "sqlserver" ? local.database_data.secrets_manager_sqlserver_user_name : ""
}
data "aws_secretsmanager_secret_version" "sqlserver_password" {
count = local.database_data.metadata_database_type == "sqlserver" ? 1 : 0
secret_id = local.database_data.metadata_database_type == "sqlserver" ? local.database_data.secrets_manager_sqlserver_password_name : ""
}
data "aws_secretsmanager_secret_version" "sqlserver_host" {
count = local.database_data.metadata_database_type == "sqlserver" ? 1 : 0
secret_id = local.database_data.metadata_database_type == "sqlserver" ? local.database_data.secrets_manager_sqlserver_host_name : ""
}